wyrihaximus/react-child-process-promise
Promise-based wrapper around ReactPHP's child process component. Spawn child processes and handle their stdout, stderr, exit codes, and streams through promises, making asynchronous command execution simpler in ReactPHP applications.
git, mysqldump, legacy sync PHP scripts) runs outside the event loop instead of stalling every in-flight request. That directly gates whether we can offer features like async exports, thumbnail generation, or on-demand report builds without a separate worker tier.react/child-process). The real decision is not "adopt this?" but "do we take a 50-line dependency or write the 50 lines ourselves?" Treat it as a reference implementation first, a dependency second.react-child-process-pool, -messenger, -closure). Whether we need concurrency limits, structured IPC, or just fire-and-forget output capture is a scope decision the PM should own before engineering picks a library.Consider it when all of the following hold:
react/child-process in the dependency graph) — otherwise the promise layer buys you nothing.Look elsewhere when:
symfony/process behind a queue (Laravel Queue, Symfony Messenger, SQS) — simpler, maintained, and gives you retries and observability for free.amphp/process is actively developed, has real adoption, and supports cancellation and structured I/O; spatie/async covers the fork-pool case. Either is a safer long-term bet.wyrihaximus/react-child-process-pool / -messenger, or better, use a real queue — subprocess-per-task does not scale to high throughput and gives you no backpressure.For executives: This is a free, MIT-licensed utility that lets our PHP service hand heavy or risky work to a separate operating-system process instead of tying up the request loop — the kind of change that improves responsiveness without adding infrastructure. The honest caveat is longevity: the library has had no releases since 2020, ~12 stars, and no downstream dependents, so it carries "we may have to maintain this ourselves" risk. That risk is acceptable only behind our own internal interface and confined to a single service. Recommendation: do not treat it as a strategic dependency, and do not let it anchor a platform bet.
For engineering: It is a promise adapter around react/child-process — spawn, collect stdout/stderr, resolve on exit. Roughly a few dozen lines. Adopt it only if we're already on ReactPHP and want the ergonomics today; otherwise copy the pattern (or use amphp/process) and own the code. Regardless of choice, wrap it in our own ProcessRunner interface so the underlying library is swappable, pin the exact version, and add our own timeout, kill, and logging behavior — the package provides none. If throughput, pooling, or IPC enters the picture, escalate to a queue rather than adding more sibling packages.
How can I help you explore Laravel packages today?