amphp/process
Asynchronous process dispatcher for PHP (AMPHP) built for fibers and concurrency. Start and manage child processes cross-platform, stream stdout/stderr without blocking, set working directory and environment variables, powered by the Revolt event loop and Windows wrapper.
Architecture fit: AMP's async model conflicts with Laravel's synchronous request lifecycle; integration requires decoupling from core Laravel components. Best suited for standalone CLI workers or external services, not within HTTP request handling.
Integration feasibility: Low for web applications; feasible only for isolated CLI tasks or background workers using separate AMP event loops. Requires significant refactoring to avoid blocking Laravel's sync execution.
Technical risk: High—AMP's event loop may conflict with Laravel's dependencies (e.g., database drivers), risking resource leaks or deadlocks. Limited Laravel-AMP compatibility testing increases unpredictability.
Key questions: What specific use case requires async process management? Is the team experienced with AMP? Can the workload be isolated from Laravel's sync stack (e.g., via message queues)?
Stack fit: AMP incompatible with Laravel's default sync execution; requires a separate process/service (e.g., dedicated worker container) to host AMP logic.
Migration path: Decouple process management from Laravel entirely—use Laravel to enqueue tasks (e.g., Redis), then process via standalone AMP service. Avoid modifying Laravel's core request/response flow.
Compatibility: Laravel's Eloquent, sessions, and HTTP middleware won't work within AMP's event loop. All AMP logic must run in isolated processes with explicit IPC (e.g., sockets, Redis).
Sequencing: Start with non-critical CLI tools (e.g., data importers), validate stability, then expand to background workers. Never integrate AMP into Laravel's web routes.
Maintenance: Higher complexity due to dual-stack management (Laravel sync + AMP async). Debugging cross-process issues requires expertise in both ecosystems.
Support: Limited AMP community support compared to ReactPHP; Laravel-specific AMP integrations are undocumented. Reliance on internal expertise for troubleshooting.
Scaling: AMP excels at handling high-concurrency process spawning but doesn't integrate with Laravel
How can I help you explore Laravel packages today?