PHP Reddit – Telegram
PHP Reddit
34 subscribers
288 photos
36 videos
24.8K links
Channel to sync with /r/PHP /r/Laravel /r/Symfony. Powered by awesome @r_channels and @reddit2telegram
Download Telegram
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
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
How I can define my one naming convention upon foreighn key constraints and unique keys?

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
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
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
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:

  
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
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
Laravel Package: Laravel Profanity MIT

Packagist: https://packagist.org/packages/evo-mark/evo-laravel-profanity

Source: https://github.com/evo-mark/evo-laravel-profanity

Everyone loves swearing, but there might be instances where you don't want to accept user input which contains it (e.g. a first name for an introductory invite email "Hello F***face").

Previously we'd used the reliable https://github.com/arandilopez/laravel-profane but it hasn't been updated since Laravel 8.

With the recent release of the Pest Profanity package, we saw an opportunity to use their curated word list to power a Larvel validation rule.

Installation and usage instructions are in the REAME.

https://redd.it/1om4zxi
@r_php