Pitch Your Project 🐘
In this monthly thread you can share whatever code or projects you're working on, ask for reviews, get people's input and general thoughts, … anything goes as long as it's PHP related.
Let's make this a place where people are encouraged to share their work, and where we can learn from each other 😁
Link to the previous edition: /u/brendt_gd should provide a link
https://redd.it/1muc8ez
@r_php
In this monthly thread you can share whatever code or projects you're working on, ask for reviews, get people's input and general thoughts, … anything goes as long as it's PHP related.
Let's make this a place where people are encouraged to share their work, and where we can learn from each other 😁
Link to the previous edition: /u/brendt_gd should provide a link
https://redd.it/1muc8ez
@r_php
Reddit
From the PHP community on Reddit
Explore this post and more from the PHP community
How hard it is to find a remote Laravel job?
I have lots of freelancing experience and have built my own products, but I’ve never worked at a company.
I think that’s a setback for most places reviewing my resume, since I get rejected immediately, and on top of that, finding Laravel jobs on job boards is really tough compared to TS or Python.
So I’d like to know your thoughts, what was your experience getting a Laravel job?
I honestly enjoy Laravel, but job market is tough!!
https://redd.it/1mue8we
@r_php
I have lots of freelancing experience and have built my own products, but I’ve never worked at a company.
I think that’s a setback for most places reviewing my resume, since I get rejected immediately, and on top of that, finding Laravel jobs on job boards is really tough compared to TS or Python.
So I’d like to know your thoughts, what was your experience getting a Laravel job?
I honestly enjoy Laravel, but job market is tough!!
https://redd.it/1mue8we
@r_php
Reddit
From the laravel community on Reddit
Explore this post and more from the laravel community
What is/would be the best in application debugging experience?
I am currently working on an overhaul for our internal debugging tool, that functions similarly to the php debugbar, and wondered what opinions people have about this style of debugger (most of the devs here dont have xdebug installed).
Is there a particular debugger you prefer using? IMO the symfony debugger is the best by far, the data collected and its presentation is not overwhelming but rich with information, but am interested in others thoughts
https://redd.it/1mukhi1
@r_php
I am currently working on an overhaul for our internal debugging tool, that functions similarly to the php debugbar, and wondered what opinions people have about this style of debugger (most of the devs here dont have xdebug installed).
Is there a particular debugger you prefer using? IMO the symfony debugger is the best by far, the data collected and its presentation is not overwhelming but rich with information, but am interested in others thoughts
https://redd.it/1mukhi1
@r_php
GitHub
GitHub - php-debugbar/php-debugbar: Debug bar for PHP
Debug bar for PHP. Contribute to php-debugbar/php-debugbar development by creating an account on GitHub.
Laravel VScode setup
I’m new to php and Laravel, how do you configure your vscode? Somehow I’m not even getting HTML emmet to work in blade components. Also autocompleting for Laravel or php is not working that well even for formatting.
My current extensions setup:
Laravel Blade Snippets -> Formatting,
PHP Intelephense,
Laravel official extension
https://redd.it/1mun3h2
@r_php
I’m new to php and Laravel, how do you configure your vscode? Somehow I’m not even getting HTML emmet to work in blade components. Also autocompleting for Laravel or php is not working that well even for formatting.
My current extensions setup:
Laravel Blade Snippets -> Formatting,
PHP Intelephense,
Laravel official extension
https://redd.it/1mun3h2
@r_php
Reddit
From the PHP community on Reddit
Explore this post and more from the PHP community
How to store User-Submitted API Keys
Hi,
I’m currently building a web application prototype using Symfony 7. In their accounts, users can add an API key so the application can connect to an external API and fetch some personal data.
My question is: What’s the best way to securely store these API keys submitted via a form? I don’t want to store them in plaintext in the database, and I can’t encrypt them like passwords because I need the original value to make API calls. I’ve been experimenting with Symfony’s Sodium Vault in my service to create secrets, but I’m not sure if this is considered a best practice.
Do you have any suggestions or insights on how to handle this securely?
https://redd.it/1muuay2
@r_php
Hi,
I’m currently building a web application prototype using Symfony 7. In their accounts, users can add an API key so the application can connect to an external API and fetch some personal data.
My question is: What’s the best way to securely store these API keys submitted via a form? I don’t want to store them in plaintext in the database, and I can’t encrypt them like passwords because I need the original value to make API calls. I’ve been experimenting with Symfony’s Sodium Vault in my service to create secrets, but I’m not sure if this is considered a best practice.
Do you have any suggestions or insights on how to handle this securely?
https://redd.it/1muuay2
@r_php
Reddit
From the symfony community on Reddit
Explore this post and more from the symfony community
Stupid question about safely outputting user or db input
Ok, I'm an old coder at 66. I started a custom ecommerce site in 2005. A LOT has happened since then and there's a lot to keep up with. Yeah, I can just get something better, more robust, and safer off the shelf. But I really enjoy exercising my brain with this stuff. And I love learning.
Here's a thought. If I have some user input from a form or database, it's essential to sanitize it for output to avoid XSS. Why doesn't PHP evolve to where ECHO already applies htmlspecialchars? So just:
$x = "Hello world";
echo $x;
isn't in the background doing echo htmlspecialchars($x);?
Or how about echo ($x,'/safe'); or something like to specify what echo should do?
It seems overly verbose to have to output everything like this:
echo htmlspecialchars($x, ENT_QUOTES, 'UTF-8') ;
Just a thought.
https://redd.it/1mv1rp9
@r_php
Ok, I'm an old coder at 66. I started a custom ecommerce site in 2005. A LOT has happened since then and there's a lot to keep up with. Yeah, I can just get something better, more robust, and safer off the shelf. But I really enjoy exercising my brain with this stuff. And I love learning.
Here's a thought. If I have some user input from a form or database, it's essential to sanitize it for output to avoid XSS. Why doesn't PHP evolve to where ECHO already applies htmlspecialchars? So just:
$x = "Hello world";
echo $x;
isn't in the background doing echo htmlspecialchars($x);?
Or how about echo ($x,'/safe'); or something like to specify what echo should do?
It seems overly verbose to have to output everything like this:
echo htmlspecialchars($x, ENT_QUOTES, 'UTF-8') ;
Just a thought.
https://redd.it/1mv1rp9
@r_php
Reddit
From the PHP community on Reddit
Explore this post and more from the PHP community
Is there a way to enable Pest output while tests are running?
I'm using Pest for tests on a new project. I was surprised to see that when I run Pest, there is no output until the tests have completely run. I would expect dots or the noscripts of the tests to display while running, but nothing. If I use --debug, then I see a ton of information, but that's not what I want. Ideally I'd love to see the test names as they run. I've tried disabling output buffering and also chatted with ChatGPT and Claude about this and they were unable to provide any help other than making stuff up. Any ideas how I can make test names appear as they are running?
https://redd.it/1mv3gg1
@r_php
I'm using Pest for tests on a new project. I was surprised to see that when I run Pest, there is no output until the tests have completely run. I would expect dots or the noscripts of the tests to display while running, but nothing. If I use --debug, then I see a ton of information, but that's not what I want. Ideally I'd love to see the test names as they run. I've tried disabling output buffering and also chatted with ChatGPT and Claude about this and they were unable to provide any help other than making stuff up. Any ideas how I can make test names appear as they are running?
https://redd.it/1mv3gg1
@r_php
Reddit
From the PHP community on Reddit
Explore this post and more from the PHP community
Variable "locale" does not exist
Hi! I’m pretty new to Symfony and, although I’m in love with this language, it’s been driving me crazy for several days because of a variable that “doesn’t exist” even though I clearly defined it in my controllers. The weird part is that it doesn’t happen in all my files, and despite using AI on the side to try to figure it out, I just can’t find the issue — I’m begging you, please save me!
Here’s the situation: I have two controllers, a HomeController and a HomeAdminController. The first one works perfectly, since I can switch from English to French without any problem. BUT when I’m on the admin side — disaster! The variable suddenly “doesn’t exist” anymore, even though it’s written in plain black and white. And I just can’t switch from English to French there. That’s what really drives me crazy, because only 3 files have this issue! Not the others!!
https://redd.it/1mv8cug
@r_php
Hi! I’m pretty new to Symfony and, although I’m in love with this language, it’s been driving me crazy for several days because of a variable that “doesn’t exist” even though I clearly defined it in my controllers. The weird part is that it doesn’t happen in all my files, and despite using AI on the side to try to figure it out, I just can’t find the issue — I’m begging you, please save me!
Here’s the situation: I have two controllers, a HomeController and a HomeAdminController. The first one works perfectly, since I can switch from English to French without any problem. BUT when I’m on the admin side — disaster! The variable suddenly “doesn’t exist” anymore, even though it’s written in plain black and white. And I just can’t switch from English to French there. That’s what really drives me crazy, because only 3 files have this issue! Not the others!!
https://redd.it/1mv8cug
@r_php
Reddit
From the symfony community on Reddit
Explore this post and more from the symfony community
Introducing Laritor: Performance monitoring made simple (and affordable) for Laravel
https://laritor.com
https://redd.it/1mv9492
@r_php
https://laritor.com
https://redd.it/1mv9492
@r_php
Laritor
Performance Monitoring & Observability for Laravel Apps
Laritor delivers real-time performance monitoring & observability for Laravel apps with AI-powered insights, customizable dashboards, instant alerts, and detailed request tracing.
What is the best way to learn Symfony from 0 today?
Hello! I hope you are well, I have a little experience in programming but with node, some REST API, the typical... But soon they may offer me a job for newcomers who use Symfony, I like to go to places prepared so as not to have surprises. I would be very grateful if the community could give me their opinion on the best way to see this technology from scratch. I have seen good opinions about Symfonycasts but I have only found references to that page from four years ago, I don't know if it is still as recommendable today.
Thank you all very much 😊
https://redd.it/1mv9406
@r_php
Hello! I hope you are well, I have a little experience in programming but with node, some REST API, the typical... But soon they may offer me a job for newcomers who use Symfony, I like to go to places prepared so as not to have surprises. I would be very grateful if the community could give me their opinion on the best way to see this technology from scratch. I have seen good opinions about Symfonycasts but I have only found references to that page from four years ago, I don't know if it is still as recommendable today.
Thank you all very much 😊
https://redd.it/1mv9406
@r_php
Reddit
From the PHP community on Reddit
Explore this post and more from the PHP community
Silent anonymous registration - is it possible?
Hello! I want to start a service where new web site visitors are being assigned new user id in the system silently. This way the registration form won't stop them from accessing payments and paid functionality. User may add and verify phone/email any time, if the phone/email is already registered then all the user's activity will be switched to the existing user in the database after the verification.
Switched user will be deleted from the system. Anonymous/unconfirmed users will be deleted after a month (or three) of inactivity.
Does Sympfony support this functionality?
edit: apparently it was available until 5.1 version
https://symfony.com/doc/4.4/images/anonymouswdt.png
https://github.com/symfony/symfony/discussions/48650
https://redd.it/1mvb49k
@r_php
Hello! I want to start a service where new web site visitors are being assigned new user id in the system silently. This way the registration form won't stop them from accessing payments and paid functionality. User may add and verify phone/email any time, if the phone/email is already registered then all the user's activity will be switched to the existing user in the database after the verification.
Switched user will be deleted from the system. Anonymous/unconfirmed users will be deleted after a month (or three) of inactivity.
Does Sympfony support this functionality?
edit: apparently it was available until 5.1 version
https://symfony.com/doc/4.4/images/anonymouswdt.png
https://github.com/symfony/symfony/discussions/48650
https://redd.it/1mvb49k
@r_php
Uptime Kita
Looking for a self-hosted way to monitor your apps and websites?
Uptime Kita: a Laravel-powered uptime monitoring tool with SSL checks, status pages, and notifications.
https://laravel-hub.com/blog/uptime-kita
https://redd.it/1mvfvjw
@r_php
Looking for a self-hosted way to monitor your apps and websites?
Uptime Kita: a Laravel-powered uptime monitoring tool with SSL checks, status pages, and notifications.
https://laravel-hub.com/blog/uptime-kita
https://redd.it/1mvfvjw
@r_php
Laravel Hub Blog
Uptime Kita – Simple Uptime Monitoring for Everyone
Uptime Kita is an open-source uptime monitoring tool built with Laravel, reflecting its goal: to make monitoring simple and useful for everyone.
Write Only Business Logic: Eliminate Boilerplate
https://dariuszgafka.medium.com/write-only-business-logic-eliminate-boilerplate-c88ba70394a1
https://redd.it/1mvqsw1
@r_php
https://dariuszgafka.medium.com/write-only-business-logic-eliminate-boilerplate-c88ba70394a1
https://redd.it/1mvqsw1
@r_php
Medium
Write Only Business Logic: Eliminate Boilerplate
When did we accept as normal that 60–70% of code we write is orchestration and boilerplate?
Visual Studio Code handling of collection objects containing specific types of objects
I'm working with laravel's collections iterable objects of Illuminate\\Database\\Eloquent\\Collection which contain models. I have a function that returns a set of particular models of a particular type only, and I thought that I could use php docblocks to have vscode correctly understand what is stored in the collection, but I seem to not be getting quite what is advertised. This is the type of method definition I'm referring to:
Then elsewhere in my code, I might do:
Instead of the IDE recognizing order as an Order object at the line noted, it sees it merely as an object of \Illuminate\Database\Eloquent\Model.
On the other hand, if I change my docblock to be thus:
Then things work as expected. The IDE recognizes that $order is not just a model but is an Order model specifically.
Anyone run into this and know how I can tweak my docblock so that the IDE is better aware of the collection contents at calling locations? I'm using the usual extensions in VSCode including PHP Intelephense (licensed).
https://redd.it/1mvw2o2
@r_php
I'm working with laravel's collections iterable objects of Illuminate\\Database\\Eloquent\\Collection which contain models. I have a function that returns a set of particular models of a particular type only, and I thought that I could use php docblocks to have vscode correctly understand what is stored in the collection, but I seem to not be getting quite what is advertised. This is the type of method definition I'm referring to:
/**
* @return \Illuminate\Database\Eloquent\Collection<App\Models\Order>
*/
function getOrders(): Collection
{
return Order::get();
}
Then elsewhere in my code, I might do:
$orders = getOrders();
foreach ($orders as $order) {
// At this line, my IDE should recognize that $order is an object of the App\Models\Order class
}
Instead of the IDE recognizing order as an Order object at the line noted, it sees it merely as an object of \Illuminate\Database\Eloquent\Model.
On the other hand, if I change my docblock to be thus:
/**
* @return \App\Models\Order[]
*/
Then things work as expected. The IDE recognizes that $order is not just a model but is an Order model specifically.
Anyone run into this and know how I can tweak my docblock so that the IDE is better aware of the collection contents at calling locations? I'm using the usual extensions in VSCode including PHP Intelephense (licensed).
https://redd.it/1mvw2o2
@r_php
Reddit
From the PHP community on Reddit
Explore this post and more from the PHP community
How do you find Laravel Cloud performance so far?
So I've been building my new app, and I shipped it on Cloud.
Since I wanted to avoid JS framework, it's using Blade and Alpine Ajax. Most pages are under < 20kb and the biggest one is 120kb.
Nightwatch tells me that the duration of the requests are between 1.71ms and 1.71s.
While I have those metrics, switching from one page to another feels really slow - Chrome tells me that a page loads between 1 - 2s. I think I've optimized the s**t ouf of the queries, added cache almost everywhere, and the biggest page has 9 queries which run in less than 30ms. Perhaps I could do something else, but I wouldn't know what - this is not the topic of this post though.
I would like to know if others in the community who doesn't rely on Vue or React have this perceived notion of slowness as well. Thanks community!
https://redd.it/1mvxbvg
@r_php
So I've been building my new app, and I shipped it on Cloud.
Since I wanted to avoid JS framework, it's using Blade and Alpine Ajax. Most pages are under < 20kb and the biggest one is 120kb.
Nightwatch tells me that the duration of the requests are between 1.71ms and 1.71s.
While I have those metrics, switching from one page to another feels really slow - Chrome tells me that a page loads between 1 - 2s. I think I've optimized the s**t ouf of the queries, added cache almost everywhere, and the biggest page has 9 queries which run in less than 30ms. Perhaps I could do something else, but I wouldn't know what - this is not the topic of this post though.
I would like to know if others in the community who doesn't rely on Vue or React have this perceived notion of slowness as well. Thanks community!
https://redd.it/1mvxbvg
@r_php
Reddit
From the laravel community on Reddit
Explore this post and more from the laravel community
deploy a php solution on customer's server
hi,
one customer, want to host the developed php solution on their server - they have use-only license.
how can i protect the source code on that server?
what i am looking for is a way to prevent them to change the code and for us to be able to prevent them for further usage if for example the payments stop.
thanks.
https://redd.it/1mw4gn1
@r_php
hi,
one customer, want to host the developed php solution on their server - they have use-only license.
how can i protect the source code on that server?
what i am looking for is a way to prevent them to change the code and for us to be able to prevent them for further usage if for example the payments stop.
thanks.
https://redd.it/1mw4gn1
@r_php
Reddit
From the PHP community on Reddit
Explore this post and more from the PHP community
"Lambo PHP devs" what are you using?
Hi all,
I heard often phrases like "node js devs are unemployed and php devs drive lambos".
What are these lambo php devs using most of the time? Vanilla php? Wordpress? Drupal? Laravel? Symfony?
https://redd.it/1mw6zxx
@r_php
Hi all,
I heard often phrases like "node js devs are unemployed and php devs drive lambos".
What are these lambo php devs using most of the time? Vanilla php? Wordpress? Drupal? Laravel? Symfony?
https://redd.it/1mw6zxx
@r_php
Reddit
From the PHP community on Reddit
Explore this post and more from the PHP community
Video interview: PHP in 2025 with core dev Gina Banyard and contributor Larry Garfield
https://youtu.be/Sjf4jXh2GJA
https://redd.it/1mw84cs
@r_php
https://youtu.be/Sjf4jXh2GJA
https://redd.it/1mw84cs
@r_php
YouTube
PHP in 2025 with core dev Gina Banyard and contributor Larry Garfield
0:00 - Intro
1:08 - Motivation to work on PHP
1:54 - Modern PHP
3:12 - JIT
5:02 - Non web server uses
6:23 - Personal work on PHP
8:24 - Governance
9:29 - Funding
12:02 - Future directions
14:36 - Cleaning up
15:56 - Closing thoughts
1:08 - Motivation to work on PHP
1:54 - Modern PHP
3:12 - JIT
5:02 - Non web server uses
6:23 - Personal work on PHP
8:24 - Governance
9:29 - Funding
12:02 - Future directions
14:36 - Cleaning up
15:56 - Closing thoughts