spiral/roadrunner-bridge
Bridge RoadRunner plugins into Spiral Framework apps. Provides bootloaders for HTTP, Queue/Jobs, KV Cache, gRPC, Centrifugo, TCP, Metrics, Logger, Locks, and scaffolding integration. Requires PHP 8.1+ and Spiral 3.14+.
composer require spiral/roadrunner-bridge$PATH.public/index.php with the bridge’s entrypoint (vendor/spiral/roadrunner-bridge/bin/roadrunner.php), or integrate the bridge’s HttpKernel via custom routing if you prefer minimal changes../rr serve -d, which loads your Laravel app in persistent worker mode—no php-fpm or Apache needed../rr worker/restart).Spiral\RoadRunnerBridge\Queue\Worker) to handle jobs without reloading Laravel each time—great for high-throughput job processing..rr.yaml: Place RoadRunner config adjacent to .env (e.g., .rr.yaml):
http:
address: 0.0.0.0:8080
pool:
num_workers: 4
max_jobs: 0 # infinite lifecycle
workers:
command: "php public/index.php"
boot() and terminate() callbacks run per-request; all service bindings persist../rr serve -d -e=debug with file watchers to auto-reload PHP code on changes during development.terminate() callbacks (from Spiral\RoadRunnerBridge\Terminate\Terminator) or Laravel’s Event::listen(Shutdown::class, ...) to clear caches, reset DB connections, or close sockets..env during runtime unless explicitly triggered. Ensure APP_ENV and other critical vars are baked into config during build or passed via --env flag.log.output: stderr, log.level: debug) to trace request routing and worker state; use dd() only in workers for isolated requests—output goes to RoadRunner logs, not CLI.Spiral\RoadRunnerBridge\Bootstrap\Bootstrapper to customize Laravel bootstrap (e.g., lazy service loading, custom config merging).config:cache, route:cache) before starting RoadRunner—persistent workers cannot recompile caches at runtime.memory_get_usage(true). If using Doctrine or long-lived ORM connections, manually clear unit-of-work or reconnect periodically (max_jobs > 0).How can I help you explore Laravel packages today?