r/PHP 9h ago

Roman Pronskiy Leaves The PHP Foundation Board and Brent Roose Joins

Thumbnail thephp.foundation
63 Upvotes

As Roman Pronskiy's term on The PHP Foundation Board comes to an end, he is replaced by the wonderful Brent Roose, from a unanimous vote. Welcome Brent! 🚀 And thank you for your years of dedication and commitment to The PHP Foundation, Roman! ❤️🐘


r/PHP 11h ago

I released PHPStreamServer 0.9: dynamic workers, native OS integration, and a redesigned message bus

7 Upvotes

Last year I shared PHPStreamServer here.

PHPStreamServer is an event-loop-based application server and process manager built entirely in PHP. It brings HTTP serving, worker supervision, scheduled tasks, logging, and metrics into a unified runtime.

Applications remain loaded between requests, with asynchronous execution powered by Revolt event loop and AMPHP.

I've been quiet publicly since my last post. During that time, I've continued using it as the primary runtime for my personal projects and improving it based on the experience. I've now released version 0.9, the project's biggest update yet.

One of the biggest architectural changes in 0.9 is that PHPStreamServer now requires FFI. This allows it to call native OS APIs directly for capabilities such as Unix-socket peer credential verification, parent-death signaling, and native file monitoring.

Some highlights:

  • Workers and scheduled tasks can now be registered and removed dynamically at runtime.
  • Message-bus commands are now a public API, allowing workers to send requests directly to the master process, for example, to start or stop on-demand workers dynamically.
  • The Unix-socket message bus was redesigned with security as a major focus. It now validates peer credentials and enforces source authorization, preventing unprivileged local users from managing a server running under a privileged account. Deserialization is also restricted to reject unsafe payloads.
  • File monitoring now uses native inotify on Linux and FSEvents on macOS, with polling as a fallback.
  • On Linux and FreeBSD, workers now use OS-level parent-death signaling, so they terminate instead of continuing as orphaned processes if the master process crashes or is killed.
  • Daemon startup now waits for the master process to initialize before reporting success.
  • Worker startup, shutdown, crash reporting, and log delivery are now more reliable.
  • The supervisor now reports non-zero worker exits and termination by operating-system signals.
  • The scheduler now supports named weekdays and months, presets such as @daily, and uses fractional-second delays for more accurate execution.
  • The public API now uses consistent worker terminology across all components.
  • Console and log output were redesigned to give PHPStreamServer a distinct and consistent visual identity.
  • Per-process network traffic monitoring now batches and sends only traffic deltas through the message bus, reducing inter-process communication overhead.

I also refreshed the documentation website with a redesigned landing page. You can check it out here:

Documentation:
https://phpstreamserver.dev/

GitHub:
https://github.com/phpstreamserver/phpstreamserver

Version 0.9 release notes:
https://github.com/phpstreamserver/phpstreamserver/releases/tag/v0.9.0

PHPStreamServer is still experimental and not yet recommended for production use.

I'd especially like feedback from developers working with long-running PHP applications, async PHP, FrankenPHP, RoadRunner, or OpenSwoole. What would you need to see before considering an application server like this for one of your projects?


r/PHP 9h ago

Another PDF library has entered the chat.

5 Upvotes

The Pop PDF library has been around for a while and just got a major facelift to support a wider range of built-in features in v6. Personally, for most of my career, working with PDFs has been a crucial part of what I do daily. This library started as my own little project years ago, but like many out there it was suited for a small set of features. If you work with PDFs in any extensive capacity, you might find yourself reaching for multiple libraries to solve you problems. Some write, but don't read. Some read, but don't write. Some just do the HTML-to-PDF thing. Others just do the merge thing.

The Pop PDF attempts to roll all of those features into one component, plus some.

Main Website: https://www.poppdf.org/

Docs Website: https://docs.poppdf.org/


r/PHP 21h ago

Discussion Thoughts on Laravel Architecture Patterns (Service Repository)

4 Upvotes

Sometime ago I was working in a Delivery Management System, we heavily incorporated the Service Repository Pattern to support all the features and capabilities of the system that was launched after 9 months of development and testing (a team of 2 developers, 1 QA tester and a project manager).

I recently started writing an article about this pattern and my opinions about it and I started to think, how would a bigger team preferablly with a software architect would go about reading the scope and coming up with a blueprint, how much architecture is worth building upfront vs overtime?

Article I have been working on: https://blaze64.dev/logs/laravel-service-repository


r/PHP 7h ago

Laravel Breeze, but for the layers underneath your controllers

0 Upvotes

Your Laravel API and your Blade UI should not own two copies of your

authorization rules.

One command scaffolds one set of services, repositories and policies —

then a versioned JSON API, a Blade UI, or both on top. The stack flag

only changes the transport.

It's not a framework. It copies real code into your app, then you can

delete the package and everything keeps working.

Policies actually enforced, no unscoped repository queries, a login

endpoint that can't be used to enumerate accounts, two CSP profiles,

no npm. Security defaults mapped to the OWASP Top 10:2025.

Laravel 10–13, PHP 8.2+, MIT. Tell me what's wrong with it.

Install

composer require cachewraith/laravel-template-structure

php artisan cachewraith:install --stack=both

Link

https://packagist.org/packages/cachewraith/laravel-template-structure


r/PHP 7h ago

WordPress freelancers/agencies: how do you monitor and maintain multiple client sites?

Thumbnail
0 Upvotes

r/PHP 4h ago

What is the best website to use to learn PHP?

0 Upvotes

What is the best free website to use to learn basics of PHP? Thank you!


r/PHP 7h ago

Is PHP still a good choice for building modern Web applications?

0 Upvotes

For a long time I have explored a lot of modern technologies from MERN to LLM and a lot more. But I remember in 2020 when chatgpt was unknown, I had learned to build web apps using PHP and built a lot of projects using PHP. But now I wonder that there are a lot of modern technologies that offers real time data ui updation dynamically. In this time creating a web application using PHP would be a great idea or not? There are a lot about php and MERN, the very first thing matters is learning curve and for php I believe that it is quite easier to learn as compared to learning react, js and nodejs. And Second is the cost to setup. Many platforms like infinity free and a lot more provides free hosting plans for php based Web apps and provide decent storage but if we compare the same with MERN, then either the cost of hosting is quite high or free tiers offers very few resources and space.

Final verdict no doubt IS going with PHP, but I want to get opinion of others.

Please share your valuable opinion and it is requested please don't use AI by copying this message to AI and Sharing AI generated answers.


r/PHP 16h ago

Built a Laravel admin starter after getting tired of stitching together Yajra + export tutorials

0 Upvotes