react/stream
Event-driven readable and writable streams for non-blocking I/O in ReactPHP. Process large data in small chunks with async-friendly stream interfaces and resource-based streams, with support for piping, backpressure, errors, and duplex streams.
Architecture fit is poor for standard Laravel applications. Laravel is built on synchronous, blocking I/O with a request-response cycle, while ReactPHP Stream is designed for event-driven, non-blocking I/O in a separate runtime environment. These paradigms conflict fundamentally—Laravel's HTTP kernel and middleware assume synchronous execution, whereas ReactPHP requires its own event loop. Integration would force incompatible architectural patterns (e.g., mixing blocking ORM calls with async streams).
Integration feasibility is low for typical Laravel use cases. The package has no Laravel-specific bindings or adapters. To use it, you'd need to decouple functionality into a standalone ReactPHP service (e.g., separate process for WebSockets or raw TCP), but even then, communication between Laravel and the service would require custom inter-process messaging (e.g., Redis, HTTP), adding complexity. Direct integration into controllers or models is infeasible due to runtime conflicts.
Technical risks are high:
Key questions:
Stack fit is only viable for isolated, high-concurrency use cases (e.g., real-time chat via WebSockets) where a separate ReactPHP service is deployed alongside Laravel. It would not fit within Laravel's request/response cycle or core components. For standard CRUD operations, queues, or HTTP APIs, Laravel's native tools are superior and simpler.
Migration path requires a full decoupling:
How can I help you explore Laravel packages today?