Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laravel Async Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit. Unchanged by v5.0.0. vxm/laravel-async remains a thin convenience layer exposing an Async facade for running closures off the request path, backed by the Swoole extension and a long-running worker rather than a queue. The release does not alter the execution model, so the core judgement holds: this is an application-server decision disguised as a composer package. Fit is strong for teams already on Swoole or Laravel Octane (Swoole driver) needing intra-request parallelism; fit is poor for PHP-FPM, managed PaaS, and serverless runtimes where the extension cannot be loaded. Nothing in the release notes suggests a new fallback driver or a process-pool implementation that would change this.

Integration feasibility. Mechanically unchanged: composer require vxm/laravel-async, publish config, use the facade. Feasibility remains gated on ext-swoole availability in the runtime image, a long-running worker instead of FPM, and coroutine-safe application code. The third gate remains the real cost and is not addressed by the release — shared container state, shared PDO connections, and shared singletons are still caller-owned hazards.

Technical risk.

  • Runtime lock-in: unchanged. Hosting narrows to self-managed containers/K8s with the Swoole extension; Forge-managed FPM, Vapor/Lambda, and most PaaS PHP runtimes remain excluded.
  • Blast radius: unchanged. A fatal error or OOM inside a coroutine takes down the worker and every in-flight task with it.
  • Durability: unchanged. In-process work is silently lost on deploy, restart, or OOM kill — no retry, backpressure, or dead-letter semantics comparable to a queue.
  • Major-version bump with a one-line changelog: v5.0.0 is a semver-major release whose entire published content is "update library support for laravel 11." Major bumps imply breaking changes, and the release notes do not enumerate them. Upgrade planning therefore requires reading the actual diff of PR #49 and the v4.1.0...v5.0.0 commit range rather than the changelog. Thin release notes on a load-bearing dependency are themselves a risk signal, and this should be scoped as discovery work, not a version bump.
  • Ecosystem drift — partially mitigated. The prior assessment flagged Laravel 11+ Concurrency and Octane maturity as eroding this package's unique value. The maintainer has now shipped L11 support, which is a real, if late, signal of intent and softens (but does not remove) the abandonment concern. Drift risk persists for Laravel 12, PHP 8.4, and Swoole 6.x, none of which are mentioned. The package's unique value remains its narrow intra-request fan-out ergonomics against a first-party alternative that requires no extension.
  • Maintenance concentration — marginally improved. One new external contributor landed this change. That is a positive data point but not a bus-factor fix: 154 stars, zero dependents, and a single primary maintainer remain the shape of the project. Treat as vendor-your-own-code.

Key questions to resolve before any commitment.

  1. Which Laravel and PHP versions are supported? Partially resolved: Laravel 11 is now explicitly in scope. Still open: Laravel 12, PHP 8.3/8.4, and Swoole 5.x/6.x version support.
  2. What exactly broke between v4.1.0 and v5.0.0? Read the diff — the changelog does not say, and a major bump on a coroutine library can mean config keys, facade signatures, or minimum PHP/Swoole constraints changed.
  3. Does it isolate DB connections, transactions, and container state per coroutine, or is that left to the caller?
  4. What are the concurrency limits, backpressure behavior, and timeout/exception semantics?
  5. Is there any interoperability with Octane — can it run inside an Octane worker without conflict? This is now the highest-value unanswered question, because Laravel 11 support makes Octane coexistence the most likely real deployment target.
  6. Does the new contributor have commit rights or a stated support commitment, or was this a one-off drive-by PR? A single merged PR is not a succession plan.

Integration Approach

Stack fit. Unchanged. Appropriate for a containerized, self-managed Laravel service already on Octane/Swoole that wants in-request parallelism. Inappropriate as a queue replacement and inappropriate for FPM-only teams without a broader runtime migration. The L11 support modestly improves fit for teams on current Laravel, but does not widen the set of viable runtimes.

Migration path. Unchanged strategy: do not rip out queues; position Async as a complement for short-lived, loss-tolerant, latency-sensitive fan-out, wrapped behind a first-party interface (App\Support\Concurrency\Runner with run(), await(), all()) implemented once by this package and once by Laravel's Concurrency facade or a spatie/async pool. That adapter is what makes a future v6 lag or a package fork a one-file change. The v5.0.0 major bump reinforces the value of that abstraction: it is the difference between an upgrade and a refactor.

Compatibility. Validate in this order, with one addition at the front: read the v4.1.0...v5.0.0 diff and enumerate breaking changes → extension availability in the base image → Swoole / PHP / Laravel version matrix (now confirmed only for L11) → Octane coexistence → coroutine-safety of the specific code paths being moved (no shared PDO, no DB::transaction spanning coroutines, no mutable singletons). Pin the package version and lock the extension version in the image; both are coupled and both moved or may move at a major boundary.

Sequencing.

  1. Upgrade triage (1–2 days): read the diff, confirm whether the team's Laravel/PHP versions are inside the new constraint set, and record the breaking changes in the repo. If already on v4.x and on L10, this is a decision point, not an automatic bump.
  2. Spike (1–2 weeks): Docker image with ext-swoole, minimal Laravel 11 app, benchmark Async against first-party Concurrency on a realistic fan-out workload (3–5 outbound HTTP calls per request).
  3. Safety harness: prove connection isolation and error containment under load and under simulated worker kill.
  4. Pilot: one low-risk, loss-tolerant path (e.g. fire-and-forget audit/analytics emission) behind the Runner interface, feature-flagged.
  5. Rollout gate: promote to latency-critical read fan-out only after p95 improvement and error-rate parity in staging under production-shaped traffic.
  6. Exit criteria: documented rollback to the Concurrency or queue implementation within one deploy — now also exercised once, by actually performing or declining the v4→v5 upgrade.

Operational Impact

Maintenance. The release cadence data point has improved slightly — a v5.0.0 exists and picked up L11 — but the project still shows a small contributor base and no stated support policy. Expect to own patches. Budget for vendoring or forking if the package becomes load-bearing. Track Laravel major upgrades manually; there is still no evidence of a same-day compatibility commitment, so assume a lag window at each Laravel major and plan the fallback before you need it. Add a standing quarterly check of the upstream repo to the dependency review so a silent stall is detected early rather than at the next Laravel upgrade.

Support. Community-only, no SLA, small issue backlog signal. Internal runbooks and a named owner remain mandatory. With the L11 change landed by a first-time contributor, escalation paths are even less predictable than the repo's activity graph suggests — do not assume the person who fixed the last thing will be reachable for the next one.

Scaling. Unchanged. Scaling shifts from "add FPM workers" to "size Swoole workers and coroutine concurrency." Tune worker_num and per-worker coroutine limits against the DB connection pool — an easy way to exhaust the database. Long-lived workers accumulate memory across coroutines; require a worker recycle policy (max_request) and memory alerting from day one.

Failure modes to instrument explicitly.

  • Worker crash → all in-flight tasks lost, partial side effects, no automatic retry.
  • Coroutine exception swallowed or logged without correlation to the originating request.
  • Connection/transaction leakage across coroutines producing intermittent, hard-to-reproduce data corruption.
  • Deploy-time task loss (SIGTERM with tasks in flight).
  • Timeout cascades: a slow dependency blocks a coroutine slot and starves the worker.
  • New: config/API drift after the v5 major bump — stale published config or facade assumptions silently changing behavior on upgrade. Add a config-diff check and a post-upgrade smoke test to the deploy pipeline.

Each needs a metric, an alert, and a documented fallback path before general availability.

Ramp-up. Unchanged in substance. The dominant cost is not the API but teaching the Swoole coroutine mental model: which state is shared, why static and singletons are dangerous, why blocking I/O is fatal, and how to reason about connection affinity. Estimate two to three weeks of learning plus a code-review checklist for any coroutine-path change. The L11 support lowers the environment-setup friction, not the conceptual learning curve; without that investment the package is more likely to introduce production incidents than to remove latency.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
htinlynn/genius-helper
maco-studios/hephaestus
elmogy/larafast
xeviant/laravel-paystack
gorilladash/laravel-website-sdk
martialbe/flysystem-oss
chondal/3312client
jeroen-g/flickr
opscale-co/nova-genbi
itsjustvita/laravel-retention
tequilarapido/trackit
gregsphotography/site-builder-filament
cabaoctavio/laravel-query-log
gregsphotography/site-builder-components
io-digital/clickatell
snowsoft/laravel-admin
oxygen/auth
relicsoftware/barakah-payment-gateway
tobya/work-with-composer
equipc/laravel-email-validator