PHP Reddit
32 subscribers
353 photos
47 videos
26.1K links
Channel to sync with /r/PHP /r/Laravel /r/Symfony. Powered by awesome @r_channels and @reddit2telegram
Download Telegram
You start with cities for one country... then one day you need the whole world.

I've been bitten by this more than once.

On one project, I needed an API for city lookup and address autocomplete.

It usually starts with a simple table containing cities for a single country.

Then requirements evolve:

* support international cities;
* handle ISO country codes;
* import data from different providers.

Or even worse, someone decides users should be able to maintain the city database manually.

So instead of writing the same component again, I cleaned it up and open-sourced it.

Features:

* City search
* Address autocomplete powered by OpenStreetMap (Photon)
* Deployable with Docker or Podman in a few commands
* Designed to be easily extended if another data source needs to be plugged in

Tech stack:

* Symfony / API Platform / PostgreSQL
* Hexagonal Architecture
* 100% unit test coverage on the domain layer
* Behat scenarios used both as executable documentation and API tests

I don't think this project is going to change the world.

But if it helps someone avoid a questionable data model, or rewriting the same component for the tenth time, then it's already worth it.

Repository: [https://github.com/thlaure/world-cities-api](https://github.com/thlaure/world-cities-api)

I'm genuinely interested in feedback, especially from people who have had to solve the same problem in production.

https://redd.it/1uw8w8k
@r_php
Refactoring an old PHP application, Rector or AI?

We have a very old but business-critical application built with Fusebox and PHP 5.5 that we finally need to modernize.

Given the number of changes required, what would be the best and fastest approach to bring it up to modern PHP standards? Has anyone had success using tools such as Rector for automated upgrades, or using AI assistants like Anthropic Claude to help developers with the migration and refactoring process?

The core business logic is solid, but the codebase has become quite messy after 25 years of minimal maintenance and contributions from many different developers.

I'd be interested in hearing about real-world experiences, recommended migration strategies, common pitfalls, and any tooling that helped accelerate the process. I fear that Rector may not be that useful because of FuseBox and since we need tomodernize the framework, Using Claude latest Fable release may be more helpful or maybe use both?

Thanks!

https://redd.it/1uwi382
@r_php
Filament package listed on Official Directory

Filarank is a filament SEO toolkit with Live SEO scoring, SERP preview, and head tags for Filament admin panels. Install in minutes with the interactive artisan installer.

https://filamentphp.com/plugins/usama-muneer-filarank-pro

Demo: https://filarank.com
Docs: https://docs.filarank.com

https://redd.it/1uwju3e
@r_php
This media is not supported in your browser
VIEW IN TELEGRAM
Which of your Blade strings actually go through __()? I made a package that shows you instantly
https://redd.it/1uwrha6
@r_php
Built a GDPR cookie-consent package for Laravel (Blade/Livewire/React) — looking for feedback

I've been building LaraGDPR, a cookie consent + cookie management package for Laravel — configurable consent banner and granular per-category preferences.



▎ - Works with Blade+Alpine.js, Livewire, or React — pick whichever your app already uses, it auto-detects/configures.

▎ - Auto-discovered by Laravel, no manual service provider registration.

▎ - Consent is recorded with a pseudonymized identity (works for both logged-in and anonymous visitors) plus IP, user agent, timestamp, and policy version.

▎ - Bump the cookie policy version and it automatically re-prompts everyone.



Honesty about licensing up front, since I know this matters here: the core is free to use in any Laravel app via Composer, but it's a source-available custom license, not OSI-approved open source — no reselling/redistributing the source, no building a competing package from it. Full terms are in the repo if you want the specifics before installing anything.



It's currently at 1.0.0-RC.6 — everything passes CI across PHP 8.2-8.4 and Laravel 11-13, but I'd rather find rough edges from real installs in real apps than assume it's ready.

If you've got a Laravel app with an existing cookie banner (or none at all) and are willing to swap it in and poke at it for 15 minutes.

I'd genuinely value the feedback — especially anything Livewire or React-mode specific, since Blade mode gets the most real-world use so far.



\- GitHub: https://github.com/minkovdev/laragdpr

\- Composer: composer require minkovdev/laragdpr



Happy to answer questions here or in GitHub Discussions.

https://redd.it/1uwu9ox
@r_php
You start with cities for one country... then one day you need the whole world.

I've been bitten by this more than once.

On one project, I needed an API for city lookup and address autocomplete.

It usually starts with a simple table containing cities for a single country.

Then requirements evolve:

* support international cities;
* handle ISO country codes;
* import data from different providers.

Or even worse, someone decides users should be able to maintain the city database manually.

So instead of writing the same component again, I cleaned it up and open-sourced it.

Features:

* City search
* Address autocomplete powered by OpenStreetMap (Photon)
* Deployable with Docker or Podman in a few commands
* Designed to be easily extended if another data source needs to be plugged in

Tech stack:

* Symfony / API Platform / PostgreSQL
* Hexagonal Architecture
* 100% unit test coverage on the domain layer
* Behat scenarios used both as executable documentation and API tests

I don't think this project is going to change the world.

But if it helps someone avoid a questionable data model, or rewriting the same component for the tenth time, then it's already worth it.

Repository: https://github.com/thlaure/world-cities-api

I'm genuinely interested in feedback, especially from people who have had to solve the same problem in production.

https://redd.it/1uwyntr
@r_php
Herd vs Lerd vs Yerd

I'm a reasonably happy user of Herd and sometimes debate upgrading to herd pro.

However with Lerd and Yerd, which seem to offer everything Herd Pro does, but free, I wondered if anyone has any input or has used either in anger?

https://lerd.sh/
https://yerd.app/

https://redd.it/1uxao86
@r_php
I built a Financial System in Laravel using strict DDD, Clean Architecture, SOLID and CQRS (No "just another CRUD").

Many people categorize PHP/Laravel as tools only suited for rapid CRUDs or small apps. I wanted to challenge that stigma by building an enterprise-grade, open-source financial management system: **Leo Counter**

Implementing the complexity of the financial sector requires unbreakable business rules. My goal was to apply the highest software engineering standards to a framework that isn't typically associated with this level of abstraction.

Under the hood:

Strict Architecture DDD, Clean Architecture, and CQRS.
Isolated Domain: The core mathematical and accounting logic lives in a pure layer, with zero toxic dependencies on the framework or Eloquent.
* Tech Stack: PHP 8+, Laravel, React, TypeScript, and Inertia.js.
* Fully Dockerized for Linux environments.

If you are passionate about software architecture, want to see how real, scalable DDD is applied in the Laravel ecosystem, or just want a private tool for your finances, I’d love for you to audit the code.

Any feedback, code roasts, PRs, or GitHub stars are super welcome!
Repo: https://github.com/juanVillamilEchavarria/Leo_Counter-app)

https://redd.it/1uxf180
@r_php
Has anyone switched to a multi carrier shipping platform?

I've been looking into different shipping software to simplify the shipping process, especially when comparing carrier rates and managing multiple shipments.

One platform I recently came across was Rollo Ship, but I'm still exploring other multi carrier shipping platforms before deciding which one makes the most sense.

For those who ship regularly, has using a shipping platform made a noticeable difference? Which features have been the most useful, whether it's shipping automation, label generation, lower shipping rates, or having everything managed through one dashboard?

I'd be interested to hear what has worked well for others and whether switching from a single carrier was worth it.

https://redd.it/1uxtgjq
@r_php
Anyone else finding Nested Widgets much easier for complex Elementor layouts?
/r/WordPressThemes/comments/1uxzwwd/anyone_else_finding_nested_widgets_much_easier/

https://redd.it/1uxzxhp
@r_php
Open source projet i've made with Fable5

Built a PHP profiler to test Fable 5… and I'm honestly impressed

I started this project mostly as an excuse to try Fable 5 in a real-world codebase.

The result is PHP Pulse: an open-source profiling tool for PHP applications that helps identify slow requests, database bottlenecks, memory usage and execution traces.

GitHub: https://github.com/quentinRogeret34/php-pulse

I expected Fable 5 to speed up development a bit, but I was genuinely surprised by how productive it made the whole process. It handled a lot of the repetitive implementation work while still letting me stay in control of the architecture and technical decisions.

The project is still evolving, but it's already usable and I'd love to get feedback from other PHP developers.

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