PHP Reddit
31 subscribers
351 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
Call for papers for PHPverse 2027

It's been a month since PHPverse 2026, which was a huge success. You can watch this year's talks here: https://www.youtube.com/playlist?list=PL0bgkxUS9EaK45-0M742u1WfK2G7FKXZQ

So we're already planning the next edition in 2027, and this time we're opening a public call for papers, everyone can submit: https://docs.google.com/forms/d/e/1FAIpQLSfp-_MYwaeVcDYZuPcL-YHHHikuoyB9hM7FUkpP2nUggba8hQ/viewform

https://redd.it/1uyuzst
@r_php
Un profiler comme PHP-SPX

Bonjour à tous 👋

J'ai récemment voulu essayer le développement d'un projet complet / complexe avec Claude Code et Fable 5. Pour répondre a mes problématiques sur des projets legacy j'ai donc développé https://github.com/quentinRogeret34/php-pulse un profiler comme celui intégré dans Symfony ou comme PHP-SPX

Je vous le partage si ça peut également vous aider dans certains de vos projet legacy

https://redd.it/1uyy94u
@r_php
Built a native Mac database GUI with Valet auto-detection — free beta

Been building Laravel apps for years and got tired of having to configure

database connections manually for local Valet projects.



Built Stratum — a native macOS database GUI that auto-detects your Valet

MySQL socket. Just open it and your local databases are there, no setup needed.



Also does PostgreSQL and SQLite with no extra config. Visual table browser,

schema designer, query editor with autocomplete, iCloud sync.



Free during beta: https://stratum.mwn-digital.uk



Curious if anyone else has been annoyed by the same thing with their local

dev setup.

https://redd.it/1uybfeg
@r_php
Worked on a settings & feature flags package package

Thought I'd post about it here. I've made and published a settings & feature fags package.

Yes I know Laravel has Pennant and Spatie has Laravel Settings. However, for what I wanted and needed in a couple of projects neither really fit what I was looking for.

I looked at other SaaS solutions like LaunchDarkly and ConfigCat and thought "I can replicate that with an OSS package." So that's what I set out to do. The initial implementation had a smaller scope was and done by hand, and then after that I brought in Claude to build out other features and refine what I had done.

Some things it comes with:

* Rule-based targeting to target users by attributes, segments, geography, device, or time (things like geolocation require external services).
* Percentage rollouts for gradual releases with consistent user bucketing
* Integration Laravel Pennant so if you're using Pennant and want to integrate this, you can have Pennant resolve to the DB
* Integrations with Laravel Telescope
* Integration with Spatie Permissions
* Highly extensible, create your own value types and drivers to add support for more things or other packages
* A lot more, but it's all covered in the docs

Since every project has its own needs, configuration and extensibility was an upfront must-have. I tried to have a sensible out of the box setup, but if something doesn't work for you, you can swap it out.


It doesn't currently ship with any interfaces or endpoints. I plan to add endpoints and Blade, Vue, React, Svelte support in the future, but I thought I'd get it out there for people to look at and provide feedback.

I've looked through the docs, making sure the steps were accurate, but if there's any gaps or something is wrong, let me know :)

I hope some of you will find it useful, I've been using it in a couple of projects 😄

GitHub: [https://github.com/GaiaTools/fulcrum-settings](https://github.com/GaiaTools/fulcrum-settings)

Docs: [https://gaiatools.com/docs/fulcrum-settings/v1](https://gaiatools.com/docs/fulcrum-settings/v1)

Packagist: [https://packagist.org/packages/gaiatools/fulcrum-settings](https://packagist.org/packages/gaiatools/fulcrum-settings)

https://redd.it/1uz4pib
@r_php
A subtle gotcha with hook/event systems: patching an object after creation doesn't retrigger the hook that ran on creation

This bit me recently and I think it's a common trap in any hook/event-driven system (WordPress actions, Laravel model events, custom pub-sub, whatever) — not just a one-off bug.


The setup: you create an object through one call, and a hook tied to that object's creation/save event runs some downstream logic (in my case, assigning an author based on a category — logic I only wanted to run once the object was fully set up). Then you attach more data to the same object through a second, narrower call — in my case, setting taxonomy terms after the post already existed.


The intuitive assumption is that the hook "sees" the object as it currently is. It doesn't. The hook only fires on the specific event it's bound to, and unless that second call also triggers that same event, the hook already ran and finished — with the object in its earlier, incomplete state. If the hook's logic checks a field that only gets set by the second call, it sees it empty every time, and the bug looks intermittent or random if the two calls sometimes land close together in your testing and sometimes don't.


The fix is boring once you see it: either combine the writes into one call before the event fires, or explicitly re-trigger the event after the follow-up call so the hook runs again with complete data. It took a while to get there though, because the actual symptom (a downstream field just not getting set some of the time) doesn't obviously point back to hook timing.


If you're chasing a "sometimes it works, sometimes it doesn't" bug involving anything that reacts to a create/save event, checking whether all the relevant data was actually present at the moment that event fired is worth doing before you start suspecting race conditions or caching.

https://redd.it/1uza4wk
@r_php
A native Mac app, with fully native UI, driven by PHP

I've applied what we've been doing on mobile to building a fully native Mac app, and... it works!

(Content warning: Heavy British sarcasm used throughout, but don't let that distract you from the reality of the discussion.)

> Prove it

I've posted a tweet about it for now with just a couple of screenshots. I'm not linking to it; you can easily find me on that hole of a website that just keeps sucking me in. In fact, I'm not going to link to anything as I'm sure I'll be accused of some kind of self-promotion.

More will come if folks are keen for this.

> Why u do dis?

Web views just aren't great ways to build great apps. They're convenient, but they're crap.

I mean, sorry all you Electron/Tauri/Capacitor folks, they're fine if you want a mediocre app or to spend months of your life debugging performance issues.

But if you want a real native app that feels really at-home on the user's device, then your best option is to build real native apps.

Sadly there aren't really any good cross-platform solutions for that problem (don't come at me with Qt's and GTK's, those aren't "good" by any stretch of the imagination).

And certainly none for the PHP gang.

Also, I wanted to nail a few things in one go for what we've been doing on Desktop up until now:

1. Get rid of Electron - it's just so heavy and comes with a bunch of gotchas. Plus having node and npm packages in the build process is continuing to scare me. aint nobody got time for that.
2. Don't replace it with Tauri - yes it's lighter, yes it's Rust so the purists can be happy. Sadly it's just swapping one mediocre solution for another.
3. Drop the PHP built-in server - yep that's what we currently use. Yes it's a crutch (that has worked pretty well!), but the time has come for better stability and better performance, and we have everything we need now to make it work without it.

This manages all of that and a little more to boot. This PoC app I've built is just 24MB. Granted it's a PoC, so it's likely to grow from there, but it's a far cry from the minimum 130MB+ just for Electron.

> So how does it work?

In case you haven't been following along what we've been doing on mobile - or perhaps you've been intentionally ignoring it because you have some bones to pick with either the name, the team, or the fact that it's using your favourite language in some profane way - we have cracked a very performant way to run PHP (>120fps ... like wayyyy greater than) and build reactive, native UIs without having it behave like a web server.

In fact, it behaves more like a game engine. It's very light on resource usage, has a ton of affordances already for native UI elements and allows you to write very idiomatic PHP code. All that without fundamentally changing PHP's core. Just adding our own extension.

We call it SuperNative. It kinda even looks a bit HTML-like, if you use Blade and squint hard enough. But deep down it's just PHP classes that compile to a custom binary format.

So there's no IPC, no HTTP calls, no multiple processes just to spin up an app. It's PHP compiled as an embed (exactly how we do it on mobile), embedded into the shell applications (in this case, a Swift macOS app), and called directly.

The application literally becomes a PHP interpreter. It boots PHP into an isolated thread that it keeps alive, feeding it messages and reading its output, all through shared memory.

Did I mention it's very fast? We're now measuring round-trips from button presses, through PHP and back out to the UI in microseconds (yup µs). And we can spin up multiple PHP threads as needed, in milliseconds (ms). And that's with a full Laravel application in there!

(Don't worry, it's still just PHP... if someone wants to help us make this not dependent on Laravel, or work with other frameworks, we'd be happy to have the support!)

All of this already works on mobile, and we're just starting to explore bringing it to the desktop.

> What's the catch?

Our focus is on mobile as way more people seem to want that. But
there are a few people still wanting advancement in the desktop space, so that's what we're trying to deliver.

This is only working on macOS for now, and it's just a proof of concept, but I'd love to tackle Mac, Windows and Linux all together.

To be able to do that, we gotta get some more sponsorship (you can sponsor nativephp on GitHub - you know how to use a browser and URLs, so I'll leave you to figure it out) and maybe then we can afford to take on yet another crazy huge project.

If this is at all interesting to you and you wanna help make it a reality, please reach out. I'm always open to chat irl and much prefer it to having anons sling zero-effect insults at me across Reddit.

https://redd.it/1v0anh4
@r_php
Who's hiring/looking

This is a bi-monthly thread aimed to connect PHP companies and developers who are hiring or looking for a job.

Rules

No recruiters
Don't share any personal info like email addresses or phone numbers in this thread. Contact each other via DM to get in touch
If you're hiring: don't just link to an external website, take the time to describe what you're looking for in the thread.
If you're looking: feel free to share your portfolio, GitHub, … as well. Keep into account the personal information rule, so don't just share your CV and be done with it.

https://redd.it/1v0kjb3
@r_php
I built a PHP 8.4+ radix-tree router with no runtime dependencies and a Laravel-like syntax
/r/PHP/comments/1v0ojm3/i_built_a_php_84_radixtree_router_with_no_runtime/

https://redd.it/1v0ojuj
@r_php
Looking for Symfony, Python/AI and community collaborators for a local AI code-analysis platform

I'm building an on-premise AI platform for software engineering and I'm looking for feedback—and hopefully to connect with people who might enjoy building it together.

The idea isn't to build another chatbot or compete with OpenAI. Instead, the goal is to combine deterministic static analysis with local LLMs and structured project knowledge.

Current stack:

* Symfony 8
* PHPStan
* PostgreSQL
* Python AI service
* Ollama
* Local RAG
* JSON-based analysis pipeline

The production application is currently private, but I've published the architecture and collaboration blueprint here:

[https://github.com/chrobaks/php-local-ai-blueprint](https://github.com/chrobaks/php-local-ai-blueprint)

I'm particularly interested in discussing:

* AI-assisted software engineering
* project knowledge representation
* local AI workflows
* agent orchestration
* static analysis
* RAG architectures

This is currently a passion project. I'm not a company and I'm not hiring. I'm simply looking for people who find this kind of technical challenge exciting.

If you're interested in exchanging ideas, discussing the architecture, or even contributing to the project, I'd genuinely love to hear from you. Whether you're a Symfony developer, Python engineer, AI enthusiast, DevOps engineer, technical writer, or someone interested in technical marketing and community building, you're very welcome.

Constructive criticism is just as valuable as code contributions.

https://redd.it/1v0wyul
@r_php
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/1v0vud2
@r_php
I built a PHP 8.4+ radix-tree router with no runtime dependencies and a Laravel-like syntax

Hi guys,
I maintain a private PHP framework (based on Laravel core) called Ariel, where I had been usingpecee/simple-router.

After upgrading the project to PHP 8.4+, I started encountering compatibility warnings. Since its latest stable release appears to date back to December 2023 and the project seems relatively inactive, I decided to replace it rather than maintain framework-specific patches.

I extracted the resulting router into a standalone open-source package:

Ariel Radix Router

The API is intentionally Laravel-like, while the implementation is a small standalone router with no runtime dependencies.

Main features:

radix-tree route matching
static, dynamic and constrained routes
Laravel-like route declarations and groups
cumulative route and group middleware
predictable middleware execution order
named routes and URL generation
scalar-typed controller parameters
compiled route catalogs and optional file cache
explicit middleware lifecycles for persistent workers
support for PHP-FPM, Workerman, RoadRunner, FrankenPHP and similar environments
PHP 8.4+

The package uses PHPUnit, is analysed with PHPStan at the maximum level, and includes reproducible microbenchmarks. I’ve also integrated it back into the original framework and tested persistent request handling and memory stability under Workerman.

It is not intended to be a drop-in replacement for Pecee or Laravel’s router. The goal is to provide a focused, modern router with a familiar API and predictable performance.

I’d particularly appreciate feedback about:

the public API
middleware lifecycle design
missing routing use cases
benchmark methodology
behaviour under long-running workers


I used Codex with GPT-5.6 Sol to help write automated tests, documentation and PHPDoc, run benchmarks, and identify bugs. All resulting changes were reviewed and validated with PHPUnit, PHPStan at the maximum level, integration tests and real Workerman runs.

GitHub: https://github.com/StefanoV1989/ariel-radix-router
Packagist: https://packagist.org/packages/stefanov1989/ariel-radix-router


Thank you in advance,
Stefano.

https://redd.it/1v0ojm3
@r_php
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/1v1d0mj
@r_php
Built a Laravel integration for the official Neo4j MCP server (Neo4j Laravel Boost)
/r/mcp/comments/1v1djej/built_a_laravel_integration_for_the_official/

https://redd.it/1v1dlm5
@r_php
Built an email validation service on Laravel + Filament

Sharing because the community here helped me a lot. The whole thing (validation engine, multi-tenant dashboard, queue workers on Horizon) is Laravel + Filament. The dashboard I'd have spent a month on took a few days with Filament.

One thing I learned building it that might interest you: catch-all domains are the bane of email validation because the server says "yes" to every address. But for Microsoft 365 tenants you can hit their GetCredentialType endpoint and it'll actually tell you if a specific mailbox exists, over plain HTTPS, no SMTP. That converted a big chunk of our "unknown" results into real answers.

I also published a Laravel package (`bounceshift/laravel`) with a `Deliverable` validation rule and a facade. It fails open by design, so if our API is down or you're out of credits, it never blocks your flow.

https://bounceshift.com

https://github.com/bounceshift/laravel

Happy to talk through any of the Laravel/Filament decisions.



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