phpstreamserver/symfony
Runs Symfony applications on the PHP Stream Server, a high-performance application server with process management, PSR-7/PSR-15 support, and configurable worker pools. Provides Symfony integration, console commands, and configuration to replace PHP-FPM.
composer require luzrain/phpstreamserver-bundle. Note what this package actually is: a Symfony bundle (the v0.2.2 note references kernel.terminate, an HttpKernel event). In a Laravel app you do not get bundle auto-discovery — the realistic path is to run PHPStreamServer standalone behind your existing front controller, or to lift the request/upload handling rather than the bundle wiring. Read the README before committing to an integration story.config/bundles.php, then create config/packages/phpstreamserver.yaml. Start with the smallest thing that runs — one HTTP server, one worker, pointing at the app's existing public/index.php.php bin/console phpstreamserver:run (plus :stop / :reload). Hit a route, then exercise an upload and confirm the temp file is gone after the response is flushed, not before.php bin/console debug:config phpstreamserver) and, for this release, grep the bundle for kernel.terminate — that listener and its new tests are the code path that changed in 0.2.2.http server for web traffic, separate workers for background/job processes, SO_REUSEPORT when multiple workers share a listening port.terminate() after each. Anything you'd normally get "for free" from php-fpm (fresh container, fresh statics) you now have to reset explicitly.kernel.terminate listener — i.e. after the response has been sent. Pattern: treat the temp file as valid only for the duration of the request; if you want to keep it, copy/move it inside the controller or a kernel.request listener and let the terminate listener no-op.Runtime::run() is what calls $kernel->terminate($request, $response). Keep it. If you're porting the pattern to Laravel, the equivalent hook is $kernel->terminate() via app()->terminating() — register the cleanup there rather than inline in a controller.phpstreamserver:run, graceful :reload for zero-downtime, worker count near CPU cores, logs to stderr.terminate() — fatal error in the worker, exception escaping the handler, custom front controller — the file leaks. Watch temp-dir disk usage in staging.unlink plus the listener is harmless-but-pointless; manual unlink before a listener that still expects the file is a bug. Conversely, confirm the listener tolerates files you've already moved to permanent storage.kernel.request/kernel.terminate listeners or recycle workers on a schedule.debug:config shows the merged view, but a running worker still holds the old one.listen: 0.0.0.0:8080 vs a unix socket; SO_REUSEPORT is required for multiple workers on the same port; check for orphaned processes after :stop.Given the 0.x line has already shipped a behavior change in a patch release, pin exactly and treat each bump as a review item.
How can I help you explore Laravel packages today?