A Week of Symfony #954 (April 7–13, 2025)
https://symfony.com/blog/a-week-of-symfony-954-april-7-13-2025?utm_source=Symfony%20Blog%20Feed&utm_medium=feed
https://redd.it/1jy49gx
@r_php
https://symfony.com/blog/a-week-of-symfony-954-april-7-13-2025?utm_source=Symfony%20Blog%20Feed&utm_medium=feed
https://redd.it/1jy49gx
@r_php
Symfony
A Week of Symfony #954 (April 7–13, 2025) (Symfony Blog)
This week, Symfony 7.3 entered its feature freeze period in preparation for its release at the end of May 2025. Development activity focused on refining and polishing its new features, including a new…
My tech lead refused to migrate from pure php to Laravel because he doesn't trust them.
Yesterday I had a tense argument with my tech lead and the ceo of our company about our ERP system that is written in pure php. I have suggested that the current codebase is really hard to understand because it does not follow any design pattern. On the other hand, we are hiring new devs soon and it's my responsibility to guide them throughout the code. However, he completely refused and said what if Laravel has been sold to a Chinese company in the future? We don't want to make our fate in their hands.
Are those fears legit? I mean do you think pure php really provides more freedom than Laravel?
https://redd.it/1jy5o2w
@r_php
Yesterday I had a tense argument with my tech lead and the ceo of our company about our ERP system that is written in pure php. I have suggested that the current codebase is really hard to understand because it does not follow any design pattern. On the other hand, we are hiring new devs soon and it's my responsibility to guide them throughout the code. However, he completely refused and said what if Laravel has been sold to a Chinese company in the future? We don't want to make our fate in their hands.
Are those fears legit? I mean do you think pure php really provides more freedom than Laravel?
https://redd.it/1jy5o2w
@r_php
Reddit
From the PHP community on Reddit
Explore this post and more from the PHP community
Weekly /r/Laravel Help Thread
Ask your Laravel help questions here. To improve your chances of getting an answer from the community, here are some tips:
What steps have you taken so far?
What have you tried from the documentation?
Did you provide any error messages you are getting?
Are you able to provide instructions to replicate the issue?
Did you provide a code example?
Please don't post a screenshot of your code. Use the code block in the Reddit text editor and ensure it's formatted correctly.
For more immediate support, you can ask in the official Laravel Discord.
Thanks and welcome to the r/Laravel community!
https://redd.it/1jyccy5
@r_php
Ask your Laravel help questions here. To improve your chances of getting an answer from the community, here are some tips:
What steps have you taken so far?
What have you tried from the documentation?
Did you provide any error messages you are getting?
Are you able to provide instructions to replicate the issue?
Did you provide a code example?
Please don't post a screenshot of your code. Use the code block in the Reddit text editor and ensure it's formatted correctly.
For more immediate support, you can ask in the official Laravel Discord.
Thanks and welcome to the r/Laravel community!
https://redd.it/1jyccy5
@r_php
Laravel
Installation - Laravel 12.x - The PHP Framework For Web Artisans
Laravel is a PHP web application framework with expressive, elegant syntax. We’ve already laid the foundation — freeing you to create without sweating the small things.
Currently, what’s the best Laravel Next.js starter available out there?
People use it? next with laravel api first?
Ive been doing a package and just got curious about the current choices out there. And well, surprising no one, it’s another one like wayfinder
but mine uses attributes instead of complete auto discovery, but generates models, requests, controllers, validation, routes
all typed ready to do api calls
https://redd.it/1jyd07r
@r_php
People use it? next with laravel api first?
Ive been doing a package and just got curious about the current choices out there. And well, surprising no one, it’s another one like wayfinder
but mine uses attributes instead of complete auto discovery, but generates models, requests, controllers, validation, routes
all typed ready to do api calls
https://redd.it/1jyd07r
@r_php
Reddit
From the laravel community on Reddit
Explore this post and more from the laravel community
Weekly Ask Anything Thread
Feel free to ask any questions you think may not warrant a post. Asking for help here is also fine.
https://redd.it/1jyp9dj
@r_php
Feel free to ask any questions you think may not warrant a post. Asking for help here is also fine.
https://redd.it/1jyp9dj
@r_php
Reddit
From the symfony community on Reddit
Explore this post and more from the symfony community
Weekly help thread
Hey there!
This subreddit isn't meant for help threads, though there's one exception to the rule: in this thread you can ask anything you want PHP related, someone will probably be able to help you out!
https://redd.it/1jyrvsh
@r_php
Hey there!
This subreddit isn't meant for help threads, though there's one exception to the rule: in this thread you can ask anything you want PHP related, someone will probably be able to help you out!
https://redd.it/1jyrvsh
@r_php
Reddit
From the PHP community on Reddit
Explore this post and more from the PHP community
How I Build SaaS Using Backpack for Laravel
https://backpackforlaravel.com/articles/tutorials/how-to-build-saas-using-backpack-for-laravel
https://redd.it/1jysm25
@r_php
https://backpackforlaravel.com/articles/tutorials/how-to-build-saas-using-backpack-for-laravel
https://redd.it/1jysm25
@r_php
Backpack for Laravel
How to Build SaaS Using Backpack for Laravel
In the previous article, I showed you how to build a CRM using Backpack for Laravel. Now, let’s take it a step further and turn it into...
Issue with Asset Mapper in Symfony (CSS import)
Hi everyone,
I'm working on a Symfony project and using Asset Mapper for the first time. I'm having trouble importing CSS files into a main CSS file. Here’s the situation:
- My
- However, when I try to use
### Additional details:
- The path seems correct (based on my project structure), but in the browser, I get the following error:
- Here’s the structure of my
### Asset Mapper Configuration:
Here is my
### What I’ve checked:
1. The
2. I used the command
3. I tried using a relative path in the import, like this:
Despite all this, the error persists, and the imported file is not found.
### Questions:
- Did I miss something in my configuration?
- Does Asset Mapper handle CSS imports (
Thanks in advance for your help!
https://redd.it/1jyuyrq
@r_php
Hi everyone,
I'm working on a Symfony project and using Asset Mapper for the first time. I'm having trouble importing CSS files into a main CSS file. Here’s the situation:
- My
admin.css file works fine when I add CSS directly to it.- However, when I try to use
@import './components/admin/_stat_card.css' inside admin.css, it doesn’t work.### Additional details:
- The path seems correct (based on my project structure), but in the browser, I get the following error:
GET https://localhost/assets/styles/components/admin/_stat_card.css net::ERR_ABORTED 404 (Not Found)
- Here’s the structure of my
assets/ folder:assets/
├── styles/
│ ├── admin.css
│ └── components/
│ └── admin/
│ └── _stat_card.css
### Asset Mapper Configuration:
Here is my
config/packages/asset_mapper.yaml file:framework:
asset_mapper:
# The paths to make available to the asset mapper.
paths:
- assets/
missing_import_mode: strict
when@prod:
framework:
asset_mapper:
missing_import_mode: warn
### What I’ve checked:
1. The
_stat_card.css file exists in the correct location.2. I used the command
php bin/console asset-map to confirm that my files are properly mapped.3. I tried using a relative path in the import, like this:
@import './components/admin/_stat_card.css';.Despite all this, the error persists, and the imported file is not found.
### Questions:
- Did I miss something in my configuration?
- Does Asset Mapper handle CSS imports (
@import) as I expect?Thanks in advance for your help!
https://redd.it/1jyuyrq
@r_php
Reddit
From the symfony community on Reddit
Explore this post and more from the symfony community
PHP and Service layer pattern
Hello, I have a small SaaS as a side product, for a long time I used to be a typical MVC guy. The views layer sends some requests to the controller's layer, the controller handles the business logic, then sends some commands to the model layer, and so on. By the time the app went complicated - while in my full-time job we used to use some "cool & trendy" stuff like services & repository pattern- I wanted to keep things organized. Most of the readings around the internet is about yelling at us to keep the business logic away of the controllers, and to use something like the service layer pattern to keep things organized. However, I found myself to move the complexity from the controller layer to the service layer, something like let's keep our home entrance clean and move all the stuff to the garage which makes the garage unorganized. My question is, how do you folks manage the service layer, how to keep things organized. I ended up by enforcing my services to follow the "Builder Pattern" to keep things mimic & organized, but not sure if this is the best way to do tho or not. Does the Builder Pattern is something to rely on with the services layer? In the terms of maintainability, testability ... etc.
Another direction, by keeping things scalar as much as possible and pass rely on the arguments, so to insert a blog post to the posts table & add blog image to the images table, I would use posts service to insert the blog post and then get the post ID to use it as an argument for the blog images service.
https://redd.it/1jyurvf
@r_php
Hello, I have a small SaaS as a side product, for a long time I used to be a typical MVC guy. The views layer sends some requests to the controller's layer, the controller handles the business logic, then sends some commands to the model layer, and so on. By the time the app went complicated - while in my full-time job we used to use some "cool & trendy" stuff like services & repository pattern- I wanted to keep things organized. Most of the readings around the internet is about yelling at us to keep the business logic away of the controllers, and to use something like the service layer pattern to keep things organized. However, I found myself to move the complexity from the controller layer to the service layer, something like let's keep our home entrance clean and move all the stuff to the garage which makes the garage unorganized. My question is, how do you folks manage the service layer, how to keep things organized. I ended up by enforcing my services to follow the "Builder Pattern" to keep things mimic & organized, but not sure if this is the best way to do tho or not. Does the Builder Pattern is something to rely on with the services layer? In the terms of maintainability, testability ... etc.
Another direction, by keeping things scalar as much as possible and pass rely on the arguments, so to insert a blog post to the posts table & add blog image to the images table, I would use posts service to insert the blog post and then get the post ID to use it as an argument for the blog images service.
https://redd.it/1jyurvf
@r_php
Reddit
From the PHP community on Reddit
Explore this post and more from the PHP community
Should a Backend Engineer Learn AI or Focus Solely on Backend Skills? How to Become a Senior Backend Engineer?
Should a backend engineer consider learning more about AI, or is it better to concentrate on strengthening backend-specific skills? What are the best ways to become a senior backend engineer?
https://redd.it/1jyvg95
@r_php
Should a backend engineer consider learning more about AI, or is it better to concentrate on strengthening backend-specific skills? What are the best ways to become a senior backend engineer?
https://redd.it/1jyvg95
@r_php
Reddit
From the PHP community on Reddit
Explore this post and more from the PHP community
Xdebug hangs on breakpoint after upgrading to PHP 8.3
https://preview.redd.it/w39y5sfprsue1.png?width=2048&format=png&auto=webp&s=63c94720f4b58659529206cfaf3a0879c1a893d0
Not sure if this is the right sub for this, but here it goes.
I'm currently upgrading from PHP 7.4 to PHP 8.3, and I'm running into a really strange issue when using Postman to make requests to my API while debugging with Xdebug.
https://preview.redd.it/xidh3g60tsue1.png?width=822&format=png&auto=webp&s=1c9bce5279cd45936a86b3848400ab2ffe483b19
If I don’t set any breakpoints in the code, everything works fine and I get the expected response. But if I set any breakpoint (literally anywhere), the request just hangs and eventually fails with an error in Postman.
On the PHPStorm side, everything seems to be properly configured — PHP version, Xdebug port, path mappings, etc.
I’ve tested a ton of things already, and I’m quite certain the issue is with Xdebug itself — but I can’t figure out if it’s a misconfiguration in PHPStorm or if I’m just doing something wrong.
I'm using:
PHP 8.3.8
Xdebug 3.3.2
Symfony 5.9.1
Any ideas or pointers would be greatly appreciated!
https://redd.it/1jyyeq3
@r_php
https://preview.redd.it/w39y5sfprsue1.png?width=2048&format=png&auto=webp&s=63c94720f4b58659529206cfaf3a0879c1a893d0
Not sure if this is the right sub for this, but here it goes.
I'm currently upgrading from PHP 7.4 to PHP 8.3, and I'm running into a really strange issue when using Postman to make requests to my API while debugging with Xdebug.
https://preview.redd.it/xidh3g60tsue1.png?width=822&format=png&auto=webp&s=1c9bce5279cd45936a86b3848400ab2ffe483b19
If I don’t set any breakpoints in the code, everything works fine and I get the expected response. But if I set any breakpoint (literally anywhere), the request just hangs and eventually fails with an error in Postman.
On the PHPStorm side, everything seems to be properly configured — PHP version, Xdebug port, path mappings, etc.
I’ve tested a ton of things already, and I’m quite certain the issue is with Xdebug itself — but I can’t figure out if it’s a misconfiguration in PHPStorm or if I’m just doing something wrong.
I'm using:
PHP 8.3.8
Xdebug 3.3.2
Symfony 5.9.1
Any ideas or pointers would be greatly appreciated!
https://redd.it/1jyyeq3
@r_php
Need Better Filtering, Searching & Sorting for DataTables in Laravel? Check Out Query Builder Criteria! 🚀
https://preview.redd.it/f3yxxnr8ntue1.png?width=1712&format=png&auto=webp&s=246f8771f46dac46f6932422c04208016cc30c44
Hey everyone! I just released a Laravel package called Query Builder Criteria, designed to make filtering, sorting, and paginating large datasets much easier—especially for datatables, admin panels, and management apps.
🔹 Automatically applies filters & sorting from the request query string
🔹 Encapsulates query logic into reusable, maintainable criteria
🔹 Keeps controllers & repositories clean
🔹 Works seamlessly with pagination for large datasets
If you’re tired of cluttered query logic and want a clean, scalable approach to handling dynamic queries, check it out on GitHub:
🔗 **github.com/omaressaouaf/query-builder-criteria**
Would love to hear your thoughts—feedback & contributions are welcome! 🚀
https://redd.it/1jz26i2
@r_php
https://preview.redd.it/f3yxxnr8ntue1.png?width=1712&format=png&auto=webp&s=246f8771f46dac46f6932422c04208016cc30c44
Hey everyone! I just released a Laravel package called Query Builder Criteria, designed to make filtering, sorting, and paginating large datasets much easier—especially for datatables, admin panels, and management apps.
🔹 Automatically applies filters & sorting from the request query string
🔹 Encapsulates query logic into reusable, maintainable criteria
🔹 Keeps controllers & repositories clean
🔹 Works seamlessly with pagination for large datasets
If you’re tired of cluttered query logic and want a clean, scalable approach to handling dynamic queries, check it out on GitHub:
🔗 **github.com/omaressaouaf/query-builder-criteria**
Would love to hear your thoughts—feedback & contributions are welcome! 🚀
https://redd.it/1jz26i2
@r_php
Data modeling a course platform with Laravel and Stripe
https://www.youtube.com/watch?v=yoCTIqthNRw
https://redd.it/1jz7071
@r_php
https://www.youtube.com/watch?v=yoCTIqthNRw
https://redd.it/1jz7071
@r_php
YouTube
Designing the data model for our course platform (with Stripe)
This is a long form video describing how I built out the complex data model for our course and e-commerce platform.
Our platform powers:
- highperformancesqlite.com
- masteringpostgres.com
- highleveragerails.com
- screencasting.com
and even more coming…
Our platform powers:
- highperformancesqlite.com
- masteringpostgres.com
- highleveragerails.com
- screencasting.com
and even more coming…
PHP Error Types Explained - Warnings, Notices, Fatal Errors, etc.
The article explains the different types of errors encountered in PHP programming and their significance: Common PHP Error Types Explained - Warnings, Notices & Fatal Errors
It categorizes PHP errors based on their severity and impact on noscript execution, providing examples and solutions for each type. The main error types discussed include fatal errors, parse errors, warnings, noticse, deprecated errors.
The article also includes debugging strategies and emphasizes the importance of understanding these error levels to ensure effective troubleshooting and maintain best practices in PHP development. It also includes debugging strategies and emphasizes the importance of understanding these error levels to ensure effective troubleshooting.
https://redd.it/1jzip2p
@r_php
The article explains the different types of errors encountered in PHP programming and their significance: Common PHP Error Types Explained - Warnings, Notices & Fatal Errors
It categorizes PHP errors based on their severity and impact on noscript execution, providing examples and solutions for each type. The main error types discussed include fatal errors, parse errors, warnings, noticse, deprecated errors.
The article also includes debugging strategies and emphasizes the importance of understanding these error levels to ensure effective troubleshooting and maintain best practices in PHP development. It also includes debugging strategies and emphasizes the importance of understanding these error levels to ensure effective troubleshooting.
https://redd.it/1jzip2p
@r_php
Qodo
What Are Common PHP Error Types? Warnings, Notices & Fatal Errors - Qodo
Read about What Are Common PHP Error Types? Warnings, Notices & Fatal Errors in our blog.
Form data validation with regular expression
My form builder site allows users to specify a regular expression for html 5 input pattern validation.
In addition to validating this on the client side with html5, the service also validates on the server side after submission as client side validation can be circumvented (e.g. by removing the pattern attribute in browser dev tools).
Client side regex on pattern attribute is compiled with the "v" flag which "enhances Unicode support in regular expressions, enabling the use of set notation, string literals within character classes, and properties of strings".
On the server side my noscript checks the input matches the pattern but the "v" flag is not available in php regex functions (I'm on php 8.3) so I am using the "u" flag.
Is this likely to fail in any circumstance? Is there a way to ensure the results are the same in JS and PHP?
Thanks guys.
https://redd.it/1jzlavw
@r_php
My form builder site allows users to specify a regular expression for html 5 input pattern validation.
In addition to validating this on the client side with html5, the service also validates on the server side after submission as client side validation can be circumvented (e.g. by removing the pattern attribute in browser dev tools).
Client side regex on pattern attribute is compiled with the "v" flag which "enhances Unicode support in regular expressions, enabling the use of set notation, string literals within character classes, and properties of strings".
On the server side my noscript checks the input matches the pattern but the "v" flag is not available in php regex functions (I'm on php 8.3) so I am using the "u" flag.
Is this likely to fail in any circumstance? Is there a way to ensure the results are the same in JS and PHP?
Thanks guys.
https://redd.it/1jzlavw
@r_php
Reddit
From the PHP community on Reddit
Explore this post and more from the PHP community
Simple php based anayltics
I have just created a very simple self hosted anayltics noscript: https://github.com/elzahaby/php-analytics/tree/main
would love to hear your opinon. The goal was to create a simple but useful anayltics noscript that allows me to ditch google analytics and since it is based on server data it doesn't require any cookies consent as far as I know.
Looking forward to hear your thoughts and what features you wish for or how to improve it :)
https://redd.it/1jzpu5a
@r_php
I have just created a very simple self hosted anayltics noscript: https://github.com/elzahaby/php-analytics/tree/main
would love to hear your opinon. The goal was to create a simple but useful anayltics noscript that allows me to ditch google analytics and since it is based on server data it doesn't require any cookies consent as far as I know.
Looking forward to hear your thoughts and what features you wish for or how to improve it :)
https://redd.it/1jzpu5a
@r_php
GitHub
GitHub - elzahaby/php-analytics: A simple Analytics Script in php
A simple Analytics Script in php. Contribute to elzahaby/php-analytics development by creating an account on GitHub.
SymfonyLive Paris 2025: Recap and replay!
https://symfony.com/blog/symfonylive-paris-2025-recap-and-replay?utm_source=Symfony%20Blog%20Feed&utm_medium=feed
https://redd.it/1jzu1rt
@r_php
https://symfony.com/blog/symfonylive-paris-2025-recap-and-replay?utm_source=Symfony%20Blog%20Feed&utm_medium=feed
https://redd.it/1jzu1rt
@r_php
Symfony
SymfonyLive Paris 2025: Recap and replay! (Symfony Blog)
SymfonyLive Paris 2025 was an amazing two-day event filled with top-notch talks, hands-on workshops, and vibrant community energy! Big thanks to our speakers, attendees, and sponsors for making it suc…
A new #phpstan capability which will be available with the upcoming release: Remembered types from constructor
https://staabm.github.io/2025/04/15/phpstan-remember-constructor-types.html
https://redd.it/1k00lnx
@r_php
https://staabm.github.io/2025/04/15/phpstan-remember-constructor-types.html
https://redd.it/1k00lnx
@r_php
My developer experience
PHPStan remembered types from constructor
Over the last few days I am working on a new PHPStan capability, which allows PHPStan to use type information from analyzing a class-constructor with the goal to improve results when later on analyzing instance methods or property hook bodies.
Locale-Aware Compact Number Formatting in PHP with NumberFormatter
https://ungureanu.blog/2025/04/15/locale-aware-compact-number-formatting-in-php-with-numberformatter/
https://redd.it/1jzbl8q
@r_php
https://ungureanu.blog/2025/04/15/locale-aware-compact-number-formatting-in-php-with-numberformatter/
https://redd.it/1jzbl8q
@r_php
Bogdan Ungureanu
Locale-Aware Compact Number Formatting in PHP with NumberFormatter
I was working recently on a small feature that needed to output numbers like 1200 to a short compact version like 1.2k. Simple right? I can just make a function or use ChatGPT to generate one for m…
How do I create an emoji font file, specific to a website and app?
I'm a total NOOB when it comes to stuff about emojis, from the system side.
Okay, what I'm about to ask is wild, and I know its a strong chance I won't getting any full on tutorials for this. I just need some leads at least into the right direction.
Long story short, I'm working with a team to build a website/app for various online use for our target audience. The emoji system is painfully limited, and are based on the Microsoft Segoe UI for Windows. Platforms often have their own emoji, Facebook, Discord, Youtube, while like Reddit DO use the Segoe UI it seems. What would I need to do, in order to create emojis for my team's website/app?
ASSUMPTIONS
This is what I assume it would require, and I'd like some insight before I proceed to waste my time with these guesses.
Custom font: the site would need it's own font, that is unique to the site, in order to display emoji.
OTF font type: to house a lot of emoji glyphs, and of course, SVG vectors as emoji.
SVG: all emoji art I'd assume would have to be SVGs, in order to be scalable and work with the font face.
Some kinda "encoding": for lack of better phrasing, once the file is created, you'll need to like... perform some kind of formatting or "encoding" so the font file is properly compatible for web and mobile use.
PHP: I'm learning some bare bones in navigating PHP (this project calls for it), and I believe there's some some sort of .php file and line(s) of code to implement your font, and some more PHP knowhow to implement your emoji.
ANY HELP is majorly appreciated, any leads, just anything.
https://redd.it/1k09hln
@r_php
I'm a total NOOB when it comes to stuff about emojis, from the system side.
Okay, what I'm about to ask is wild, and I know its a strong chance I won't getting any full on tutorials for this. I just need some leads at least into the right direction.
Long story short, I'm working with a team to build a website/app for various online use for our target audience. The emoji system is painfully limited, and are based on the Microsoft Segoe UI for Windows. Platforms often have their own emoji, Facebook, Discord, Youtube, while like Reddit DO use the Segoe UI it seems. What would I need to do, in order to create emojis for my team's website/app?
ASSUMPTIONS
This is what I assume it would require, and I'd like some insight before I proceed to waste my time with these guesses.
Custom font: the site would need it's own font, that is unique to the site, in order to display emoji.
OTF font type: to house a lot of emoji glyphs, and of course, SVG vectors as emoji.
SVG: all emoji art I'd assume would have to be SVGs, in order to be scalable and work with the font face.
Some kinda "encoding": for lack of better phrasing, once the file is created, you'll need to like... perform some kind of formatting or "encoding" so the font file is properly compatible for web and mobile use.
PHP: I'm learning some bare bones in navigating PHP (this project calls for it), and I believe there's some some sort of .php file and line(s) of code to implement your font, and some more PHP knowhow to implement your emoji.
ANY HELP is majorly appreciated, any leads, just anything.
https://redd.it/1k09hln
@r_php
Reddit
From the PHP community on Reddit
Explore this post and more from the PHP community
Resources to learn pure php best practices?
I recently have become involved in maintaining a legacy php application running php 7. Does anyone have any recommendations for learning the fundamentals of php?
I come from a web dev background mostly using rails. The application I'm working with generally makes sense to me, and I am able to get things working. However I'd love to have some idea what I'm doing beyond simply making things work.
We're attempting to build out some new features with moderately complex logics. More intricate DB interactions, users submitting/displaying html, including a few JS libraries, and some other stuff. Im very interested in getting a better understanding of php in order to properly design these features.
https://redd.it/1k0eui7
@r_php
I recently have become involved in maintaining a legacy php application running php 7. Does anyone have any recommendations for learning the fundamentals of php?
I come from a web dev background mostly using rails. The application I'm working with generally makes sense to me, and I am able to get things working. However I'd love to have some idea what I'm doing beyond simply making things work.
We're attempting to build out some new features with moderately complex logics. More intricate DB interactions, users submitting/displaying html, including a few JS libraries, and some other stuff. Im very interested in getting a better understanding of php in order to properly design these features.
https://redd.it/1k0eui7
@r_php
Reddit
From the PHP community on Reddit
Explore this post and more from the PHP community