revolt/event-loop
Revolt is a rock-solid event loop for concurrent PHP 8.1+ apps using fibers. It enables non-blocking I/O with synchronous code, serving as a minimal, shared scheduler base for libraries like Amp and ReactPHP.
Architecture fit: Revolt's event loop is designed for low-level concurrent PHP applications but doesn't align with Laravel's synchronous, request-response architecture. Laravel's core components (Eloquent, HTTP kernel) are built for blocking I/O, making Revolt a poor fit for standard web applications. Potential use cases might include custom queue workers or standalone async services, but this would require significant architectural separation from the main Laravel stack.
Integration feasibility: Low. Laravel lacks native fiber-aware components, and most ecosystem packages (e.g., database drivers, cache systems) are synchronous. Integrating Revolt would require rewriting critical I/O paths to use non-blocking APIs, which isn't feasible for most Laravel projects. The package also lacks Laravel-specific adapters or integrations, forcing developers to build custom abstractions.
Technical risk: High. Historical issues (e.g., memory leaks in suspensions, fiber reference management) in earlier versions indicate stability concerns for long-running processes. Laravel's error handling and lifecycle management (e.g., request termination, shutdown hooks) aren't designed for fiber-based concurrency, increasing risks of unhandled exceptions, resource leaks, and unpredictable behavior. PHP's JIT compatibility issues (e.g., in UvDriver) further compound risks.
Key questions:
Stack fit: Poor. Laravel typically runs on PHP-FPM (blocking I/O) or Octane (Swoole/ReactPHP-based), while Revolt is a standalone event loop incompatible with these runtimes. Octane's architecture is fundamentally different, and Revolt lacks integration points for Laravel's HTTP kernel or queue workers. It would require building a completely custom runtime environment outside Laravel's standard stack.
Migration path: Not applicable for existing Laravel applications. If pursuing async capabilities, developers should leverage Octane with Swoole/ReactPHP instead. For new projects requiring Revolt, it would need to be a standalone service with no Laravel dependencies, using a microservice architecture where only specific high-concurrency tasks run on Revolt.
Compatibility: Minimal. PHP 8.1+ is required (Laravel supports this), but critical Laravel components (e.g., Illuminate\Database, Illuminate\Http) are
How can I help you explore Laravel packages today?