hhxsv5/laravel-s
LaravelS is a high-performance adapter that integrates Swoole with Laravel and Lumen, enabling coroutine-based, resident-memory HTTP/WebSocket/TCP/UDP servers, async tasks, connection pooling, and hot reload. It boosts throughput and lowers latency for existing Laravel apps with minimal code changes...
Adopt when:
swoole/openswoole PHP extension — containers, VMs, or on-prem hardware you control. Not viable on most managed or serverless PHP platforms.$GLOBALS, config mutations, and package compatibility, plus regression tests that exercise repeated requests in one worker.configure()), but it confirms the project is still receiving attention.Look elsewhere when:
$_SERVER/$_SESSION reads). Migration cost can exceed the performance win.Upgrade note for v3.8.8: the release adds a return type to configure(). Normally a safe patch bump, but any code subclassing LaravelS classes and overriding configure() without a compatible return type will fatal. One grep for function configure( before rollout clears it.
For executives: This is a cost-and-latency play, not a customer-facing feature. Serving Laravel from resident Swoole workers instead of PHP-FPM typically reduces the compute needed for a given traffic level, because the framework boots once per worker rather than once per request. It also lets us ship real-time endpoints and background processing without standing up additional services. The trade is operational: long-lived workers demand engineering discipline around request isolation. Recommendation is a bounded pilot on one high-traffic service with a measured before/after on latency and instance count — not a fleet-wide mandate.
For engineering: LaravelS keeps the application in memory across requests and provides coroutine I/O, task workers, timers, and WebSocket support in one dependency. The adoption cost is real and mostly cultural: controllers and services must be stateless by construction, per-request resets go through CleanerInterface, cross-worker shared state goes through Swoole\Table, and any blocking call — sleep(), synchronous HTTP, heavy CPU — stalls every concurrent user on that worker. Plan for max_request tuning to bound memory growth, reload versus restart discipline in the deploy script, nginx in front for TLS and static assets, and supervisor/systemd around bin/laravels start -d. The v3.8.8 change is a return-type declaration on configure(); safe as a patch bump unless we override that method anywhere.
How can I help you explore Laravel packages today?