Is AI actually helpful in PHP coding if the generated code doesn’t match exactly what we need?
I’ve been experimenting with AI tools for PHP development. Sometimes the AI-written code looks correct but doesn’t work as expected or needs heavy tweaking.
Has anyone here found consistent ways to make AI output more accurate for real-world PHP projects?
https://redd.it/1oj1sd8
@r_php
I’ve been experimenting with AI tools for PHP development. Sometimes the AI-written code looks correct but doesn’t work as expected or needs heavy tweaking.
Has anyone here found consistent ways to make AI output more accurate for real-world PHP projects?
https://redd.it/1oj1sd8
@r_php
Reddit
From the PHP community on Reddit
Explore this post and more from the PHP community
Is it a common practice to import first a db dump and then run migrations?
In a Symfony project I am trying to introduce migrations with its history. I tried to create migration from scratch like this:
Then I would version the nessesary migrations via:
But I find it impractical because:
1. If I try to run them upon actual Db creation of constraints fail upon creation or removal.
2. During work I would get interrupted via various tasks, thereforeit is impractical to re-write history, not to mention that this task has the lowest (as usual) priority.
3. Coleagues continue to add migrations like this:
Then manuallt open the generated migration file and run the gnerated sql by hand during deployment. Afterwards they commit the file.
So I am looking a way to reintroduce them. In order to do this I thought top initiaqlize the db migrations like this:
1. Remove any existing migrations
2. Import staging Dump
3. Generate a migration like this:
It is a practical approach though. Do you usually import an initial dump and then run migrations upon upon actual production systems as well?
https://redd.it/1oj9u3i
@r_php
In a Symfony project I am trying to introduce migrations with its history. I tried to create migration from scratch like this:
#! /bin/bash
SCRIPTPATH="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &> /dev/null && pwd)"
git checkout master
git pull origin master
git branch -d task/QDS-5421-introduce-migrations
git checkout task/QDS-5421-introduce-migrations
# Remove all migrations
cp -r ./migrations ./migrations.orig
# Recreater DB
php bin/console doctrine:database:drop --force
php bin/console doctrine:database:create
php bin/console doctrine:migrations:diff
php bin/console doctrine:migrations:migrate
# Create migration that populates initial data
php bin/console doctrine:migrations:generate
# Populate generated migration with data
# Introducer staging changes
git checkout test
git pull origin test
git checkout task/QDS-5421-introduce-migrations
git merge test
php bin/console doctrine:migrations:diff
php bin/console doctrine:migrations:migrate
bash ${SCRIPTPATH}/import_test.sh
# Tool to modify migration's SQL in rder to avoid migration breaking
# Introduce dev changes
git checkout development
git pull origin development
git checkout task/introduce_migrations
git merge development
php bin/console doctrine:migrations:diff
php bin/console doctrine:migrations:migrate
git add .
git commit -m "Renew Migrations"
Then I would version the nessesary migrations via:
php bin/console doctrine:migrations:version
But I find it impractical because:
1. If I try to run them upon actual Db creation of constraints fail upon creation or removal.
2. During work I would get interrupted via various tasks, thereforeit is impractical to re-write history, not to mention that this task has the lowest (as usual) priority.
3. Coleagues continue to add migrations like this:
php bin/migrations doctrine:migrations:diff
Then manuallt open the generated migration file and run the gnerated sql by hand during deployment. Afterwards they commit the file.
So I am looking a way to reintroduce them. In order to do this I thought top initiaqlize the db migrations like this:
1. Remove any existing migrations
2. Import staging Dump
3. Generate a migration like this:
php bin/migrations doctrine:migrations:diff
It is a practical approach though. Do you usually import an initial dump and then run migrations upon upon actual production systems as well?
https://redd.it/1oj9u3i
@r_php
Reddit
From the symfony community on Reddit
Explore this post and more from the symfony community
SymfonyCon Amsterdam 2025: Surviving a Symfony Upgrade
https://symfony.com/blog/symfonycon-amsterdam-2025-surviving-a-symfony-upgrade?utm_medium=feed&utm_source=Symfony%20Blog%20Feed
https://redd.it/1ojbhk6
@r_php
https://symfony.com/blog/symfonycon-amsterdam-2025-surviving-a-symfony-upgrade?utm_medium=feed&utm_source=Symfony%20Blog%20Feed
https://redd.it/1ojbhk6
@r_php
Symfony
SymfonyCon Amsterdam 2025: Surviving a Symfony Upgrade (Symfony Blog)
Join us at #SymfonyCon Amsterdam 2025, taking place on November 27–28, and don’t miss Anna Filina’s talk “Surviving a Symfony Upgrade” — where she shares strategies to future-proof your Sy…
Longhorn PHP 2025 (recap from a speaker)
https://scherzer.dev/Blog/20251029-longhorn-php
https://redd.it/1ojnaxs
@r_php
https://scherzer.dev/Blog/20251029-longhorn-php
https://redd.it/1ojnaxs
@r_php
scherzer.dev
Blog: Longhorn PHP 2025
My little laravel built tool is live on product hunt
Hi today mi litle tool, an api for random images is live on product hunt, it is built with laravel and allows to recover a random image. You can use it in many ways, inside server side or just inside a html img tag.
Product hunt link.
https://www.producthunt.com/posts/random-images-api
https://redd.it/1ojumbi
@r_php
Hi today mi litle tool, an api for random images is live on product hunt, it is built with laravel and allows to recover a random image. You can use it in many ways, inside server side or just inside a html img tag.
Product hunt link.
https://www.producthunt.com/posts/random-images-api
https://redd.it/1ojumbi
@r_php
Product Hunt
Random Images APi: Get your random image for your next project. | Product Hunt
Years ago I built this website providing a simple API for retrieving a random image API. Now I reworked it to make it faster, and to also include a list of photos by cities. Now you can find photos related to your city of interest.
New in Symfony 7.4: Better Currency Filtering
https://symfony.com/blog/new-in-symfony-7-4-better-currency-filtering?utm_medium=feed&utm_source=Symfony%20Blog%20Feed
https://redd.it/1ojuhzp
@r_php
https://symfony.com/blog/new-in-symfony-7-4-better-currency-filtering?utm_medium=feed&utm_source=Symfony%20Blog%20Feed
https://redd.it/1ojuhzp
@r_php
Symfony
New in Symfony 7.4: Better Currency Filtering (Symfony Blog)
Symfony 7.4 makes currency handling smarter by filtering out obsolete currencies and adding new options to validate and display only relevant ones.
Getting Business Support for Refactoring — How Do You Do It?
Convincing stakeholders to invest in refactoring is still one of the hardest parts of working with mature PHP systems. You see the slowdown, the bugs, the time we lose fighting legacy code — but the business sees "you want to rewrite something that already works."
I usually try to tie refactoring to clear business outcomes (faster delivery, reduced incidents, unblocking features), and sometimes do a tiny proof-of-concept first — just enough to show the impact instead of arguing about it. Even then, it's still a negotiation.
How do you handle this?
What has actually worked for you when trying to get approval for technical cleanup or refactoring? Any frameworks, arguments, metrics, or stories that helped you convince non-technical decision-makers?
For me, showing smaller wins first, talking in terms of ROI instead of "clean code", and treating this like a sales process (because it is) made the biggest difference. But I'm curious how others handle the same battle.
If you want more of my thoughts on the topic, last edition of PHP at Scale is here:
https://phpatscale.substack.com/p/php-at-scale-14
https://redd.it/1ojw1w1
@r_php
Convincing stakeholders to invest in refactoring is still one of the hardest parts of working with mature PHP systems. You see the slowdown, the bugs, the time we lose fighting legacy code — but the business sees "you want to rewrite something that already works."
I usually try to tie refactoring to clear business outcomes (faster delivery, reduced incidents, unblocking features), and sometimes do a tiny proof-of-concept first — just enough to show the impact instead of arguing about it. Even then, it's still a negotiation.
How do you handle this?
What has actually worked for you when trying to get approval for technical cleanup or refactoring? Any frameworks, arguments, metrics, or stories that helped you convince non-technical decision-makers?
For me, showing smaller wins first, talking in terms of ROI instead of "clean code", and treating this like a sales process (because it is) made the biggest difference. But I'm curious how others handle the same battle.
If you want more of my thoughts on the topic, last edition of PHP at Scale is here:
https://phpatscale.substack.com/p/php-at-scale-14
https://redd.it/1ojw1w1
@r_php
Substack
PHP at Scale #14
This time I'm focusing on how to convincing stakeholders who aren’t quite technical to approve the time and resources for the refactoring.
How I can define my one naming convention upon foreighn key constraints and unique keys?
On Symfony I setup my db changes as:
And I want to introduce migrations but because the introduction is a laborious task and it is getting iterrupted I though as a preparatory step to be an application of a common naming convention for unique constraints,indexes and foreighn keu definitions.
The goal it to annotate the foreihn key name definition upon ORM if nessesary but if not defined to use this naming convention:
And its respective index as:
Is there a way to do this whithout need to annotate any Entity but only in particular cases?
https://redd.it/1ojx3l2
@r_php
On Symfony I setup my db changes as:
php bin/console doctrine:schema:update
And I want to introduce migrations but because the introduction is a laborious task and it is getting iterrupted I though as a preparatory step to be an application of a common naming convention for unique constraints,indexes and foreighn keu definitions.
The goal it to annotate the foreihn key name definition upon ORM if nessesary but if not defined to use this naming convention:
fk_^base_table^_^referenced_table^
And its respective index as:
idx_^foreighn_key^
Is there a way to do this whithout need to annotate any Entity but only in particular cases?
https://redd.it/1ojx3l2
@r_php
Reddit
From the symfony community on Reddit
Explore this post and more from the symfony community
What's New in Laravel 12.36 (setAppends on collections, HTTP updates & get previous route name)
https://youtu.be/KKAKQKhKdHk
https://redd.it/1ok1wij
@r_php
https://youtu.be/KKAKQKhKdHk
https://redd.it/1ok1wij
@r_php
YouTube
What's New in Laravel 12.36 (setAppends on collections, HTTP updates & get previous route name)
What's new in Laravel is back! We share new features of the Laravel framework every week 🙌 (v12.36)
1️⃣ Add Eloquent methods: setAppends
https://github.com/laravel/framework/pull/57561
2️⃣ Concurrency control in Http::pool
https://github.com/larave…
1️⃣ Add Eloquent methods: setAppends
https://github.com/laravel/framework/pull/57561
2️⃣ Concurrency control in Http::pool
https://github.com/larave…
SymfonyCon Amsterdam 2025: Multi-Tenantize the Symfony components
https://symfony.com/blog/symfonycon-amsterdam-2025-multi-tenantize-the-symfony-components?utm_medium=feed&utm_source=Symfony%20Blog%20Feed
https://redd.it/1ok6njr
@r_php
https://symfony.com/blog/symfonycon-amsterdam-2025-multi-tenantize-the-symfony-components?utm_medium=feed&utm_source=Symfony%20Blog%20Feed
https://redd.it/1ok6njr
@r_php
Symfony
SymfonyCon Amsterdam 2025: Multi-Tenantize the Symfony components (Symfony Blog)
Join SymfonyCon Amsterdam 2025 (Nov 27–28) and don’t miss Iain Cambridge’s talk “Multi-Tenantize the Symfony Components” — practical strategies to extend Symfony components and build scala…
Best practices for local development using Bref
I have recently started using Bref and loving it. I’m building a few small sites running on Lambda and it’s saving me quite a bit of money on hosting fees.
Also moved some existing sites to Bref and have been able to shut down servers.
The deploy command is very powerful and will setup all my SNS / SQS etc on AWS.
I hate the idea of having to have completely different logic for development than production. For example I run Bref in docker which also handles my assets, whilst in production they are uploaded to S3.
Anyone using Bref, how do you best bridge the gap between development / local and production? Localstack seems a good solution but is limited as well.
https://redd.it/1ok9nhm
@r_php
I have recently started using Bref and loving it. I’m building a few small sites running on Lambda and it’s saving me quite a bit of money on hosting fees.
Also moved some existing sites to Bref and have been able to shut down servers.
The deploy command is very powerful and will setup all my SNS / SQS etc on AWS.
I hate the idea of having to have completely different logic for development than production. For example I run Bref in docker which also handles my assets, whilst in production they are uploaded to S3.
Anyone using Bref, how do you best bridge the gap between development / local and production? Localstack seems a good solution but is limited as well.
https://redd.it/1ok9nhm
@r_php
Reddit
From the PHP community on Reddit
Explore this post and more from the PHP community
Best PHP and computer science courses for professional development in 2026?
Hey everyone,
I’m a full-stack web developer looking to level up my PHP skills in 2026. I’m mostly self-taught, so I want to rebuild my fundamentals from the ground up, not just in PHP but in computer science in general. I also want to dig into more advanced topics like modern architecture, design patterns, performance, and testing.
I’m open to online or in-person courses, certifications, or developer conferences that can help me become a stronger and more well-rounded developer.
If you’ve taken any courses or attended any events that really helped you grow, I’d love to hear your recommendations.
Thanks in advance!
https://redd.it/1okv8ot
@r_php
Hey everyone,
I’m a full-stack web developer looking to level up my PHP skills in 2026. I’m mostly self-taught, so I want to rebuild my fundamentals from the ground up, not just in PHP but in computer science in general. I also want to dig into more advanced topics like modern architecture, design patterns, performance, and testing.
I’m open to online or in-person courses, certifications, or developer conferences that can help me become a stronger and more well-rounded developer.
If you’ve taken any courses or attended any events that really helped you grow, I’d love to hear your recommendations.
Thanks in advance!
https://redd.it/1okv8ot
@r_php
Reddit
From the PHP community on Reddit
Explore this post and more from the PHP community
Is there a tool that is able to convert a dump into Symfony Migration?
I am in search for a tool that allows me to convert an SQL dump into a Symfony migration, the reason why is because I am reintroducing migrations into my system and I my coleagues to just run:
In order to setup a new Db schema. Is there a way to do this, does worth the effort and time?
https://redd.it/1okvedt
@r_php
I am in search for a tool that allows me to convert an SQL dump into a Symfony migration, the reason why is because I am reintroducing migrations into my system and I my coleagues to just run:
php bin/console doctrine:migrations:migrate
In order to setup a new Db schema. Is there a way to do this, does worth the effort and time?
https://redd.it/1okvedt
@r_php
Reddit
From the symfony community on Reddit
Explore this post and more from the symfony community
Case Study: Lights, Camera, Action: How Symfony Built a National Film Award Platform in Record Time
https://symfony.com/blog/case-study-lights-camera-action-how-symfony-built-a-national-film-award-platform-in-record-time?utm_medium=feed&utm_source=Symfony%20Blog%20Feed
https://redd.it/1okwptw
@r_php
https://symfony.com/blog/case-study-lights-camera-action-how-symfony-built-a-national-film-award-platform-in-record-time?utm_medium=feed&utm_source=Symfony%20Blog%20Feed
https://redd.it/1okwptw
@r_php
Symfony
Case Study: Lights, Camera, Action: How Symfony Built a National Film Award Platform in Record Time (Symfony Blog)
When UGC set out to create a brand-new national film award for teachers in just a few weeks, the challenge seemed impossible. Discover how Antéa Solutions and Symfony turned this bold idea into a lar…
Trying to make my own login logic but Fortifys routes are blocking my routes.
Yeah I’m just fiddling so no need to bark at me for changing the login logic.
But where are the fortify /login /register routes or can I ”publish” the stubs? Currently npm run dev gives errors about duplicate routes when I add /login /register to web.php
I’m using Laravel 12.32 something with inertia vue.
https://redd.it/1olhwjg
@r_php
Yeah I’m just fiddling so no need to bark at me for changing the login logic.
But where are the fortify /login /register routes or can I ”publish” the stubs? Currently npm run dev gives errors about duplicate routes when I add /login /register to web.php
I’m using Laravel 12.32 something with inertia vue.
https://redd.it/1olhwjg
@r_php
Reddit
From the laravel community on Reddit
Explore this post and more from the laravel community
Evolving PHP Streams for Async, Security, and Performance
https://thephp.foundation/blog/2025/10/30/php-streams-evolution/
https://redd.it/1olttqt
@r_php
https://thephp.foundation/blog/2025/10/30/php-streams-evolution/
https://redd.it/1olttqt
@r_php
thephp.foundation
Evolving PHP Streams for Async, Security, and Performance
The PHP Foundation — Supporting, Advancing, and Developing the PHP Language