vxm/laravel-async
vxm/laravel-async brings asynchronous and parallel execution to Laravel. Run closures and tasks concurrently with a simple API, await results, handle errors, and cap concurrency—ideal for speeding up slow I/O, reports, and batch jobs without restructuring your app.
proc_open/fork helper that teams typically write once and maintain badly. At MIT license and a single Composer line, the build cost is effectively zero — the real decision is whether to add a dependency versus own the code, and the answer tilts toward adopting with an internal abstraction wrapper.artisan command; dashboard tiles that each hit a separate aggregate query.Adopt when most of these are true:
artisan commands, scheduled tasks. This is the reliable deployment shape; treat php-fpm/web-request usage as unsupported-by-default and require engineering sign-off.pcntl/posix available. Windows developers and locked-down container images are a real friction point; confirm the whole team and all environments can run it before adopting.TaskRunner contract) so the underlying library is swappable.Look elsewhere when any of these are true:
pcntl.Risk notes to log: 154 stars, zero dependents, and a single maintainer means low ecosystem validation and bus-factor exposure. v5.0.0 is a positive maintenance signal — an outside contributor shipped the Laravel 11 bump — but one merged PR does not change the bus-factor picture. Treat it as a thin veneer over spatie/async (its underlying engine) — pin the version deliberately (note that a v4 → v5 major bump may carry framework-version constraints), wrap it, and plan the fallback of depending on spatie/async directly if maintenance stalls. Re-check upstream at the next Laravel major release; that is the moment this package either keeps pace or becomes a liability.
To executives: This is a small, free, MIT-licensed library that lets one of our PHP processes do several waiting-on-the-network things at once instead of one after another. Practically, it compresses multi-step API and report-generation features from several seconds into roughly the slowest single step, without buying new infrastructure or adding a service to operate. The latest release adds Laravel 11 support, so it stays aligned with our framework upgrade path rather than becoming a blocker to it. Cost is one dependency and roughly one sprint of engineering to integrate and instrument; risk is contained because we'll isolate it behind our own interface and can replace it. It is a latency and time-to-market lever, not an architecture change — it does not replace our queue system for anything that must not be lost.
To engineering: Adopt it as a narrow, wrapped utility for parallel I/O in CLI contexts. Concretely: define a TaskRunner interface, implement it with this package, and forbid direct facade calls outside that adapter. Constrain fan-out (cap concurrency at ~3–5), forbid nesting, and require every dispatched closure to be idempotent and self-contained (no shared mutable state, no reliance on the parent's DB transaction). Add a lint or code-review rule so it never lands in a web-request path without an explicit decision. On v5.0.0 specifically: it's a major bump whose stated change is Laravel 11 support, so diff the composer constraints and confirm our current framework version is still in range before upgrading; test the upgrade in a branch rather than folding it into an unrelated release. Instrument wall-clock time saved and job failure counts from day one — those two numbers are the business case for the eventual queue migration. Set a review date in six months against upstream activity; if releases stall, swap the adapter to spatie/async (a one-file change) rather than forking the library.
Ask: approve the dependency and one sprint of integration work, with the explicit constraint that this is scoped to latency on I/O-bound CLI work and is not a substitute for background job infrastructure.
How can I help you explore Laravel packages today?