laravelcollective/bus
A command bus for Laravel that dispatches commands to their handlers, with middleware support and container integration for cleaner, decoupled application logic.
Architecture fit. laravelcollective/bus is a standalone extraction of Laravel's command bus (dispatcher, handler resolution, middleware pipeline, queueing dispatch). Its architectural value is essentially zero on any Laravel ≥ 5.1 stack: the command bus ships in the framework core (Illuminate\Bus\Dispatcher, Illuminate\Contracts\Bus\Dispatcher, dispatch() helper, ShouldQueue and middleware), so this package would duplicate or shadow first-party classes. It only "fits" in a narrow scenario — a Laravel 4.2/5.0-era application that wants command/handler separation without upgrading the framework, or a non-Laravel consumer wiring Illuminate components manually.
Integration feasibility. Mechanically low effort (composer require, register BusServiceProvider, optionally alias the dispatcher facade) but practically fragile. In 2015-era apps, installation is a one-line dependency; in modern apps it is a dependency-conflict generator, because the package pins Illuminate/Symfony components from that period. Attempting to install it alongside Laravel 8–12 will either fail resolution or force downgrades that break the framework.
Technical risk. High and non-mitigable:
each(), untyped signatures) are deprecated or removed in PHP 7.4+/8.x.composer audit, with no upgrade path short of forking.Key questions.
Illuminate\Contracts\Bus\Dispatcher satisfy the need without the abandoned dependency?Recommendation: do not adopt. Treat as a legacy artifact only, and only inside an application already pinned to that era.
Stack fit. Native fit only with PHP 5.5/5.6 and Illuminate ~5.0. On Laravel 5.1+ through 12, the correct integration is no package — use Illuminate\Bus, dispatch(), ShouldQueue, and bus middleware provided by the framework. On non-Laravel PHP services, prefer illuminate/bus (first-party, maintained) over this fork if a command bus is genuinely required.
Migration path. Two directions:
LaravelCollective\Bus\* imports with Illuminate\Bus\* / Illuminate\Contracts\Bus\*; delete the service provider registration; remove the dependency; verify handler resolution (SelfHandling vs. CommandHandler) maps to the framework's HandlerResolver; confirm queued commands still serialize identically. This is a mechanical refactor with a real test surface around queue payloads.Compatibility. Assume incompatibility by default. Validate with composer why-not, composer audit, and a PHP 8.3 matrix run before any commitment. Pay particular attention to serialized job payloads in queues — changing dispatcher internals can orphan in-flight jobs during rollout.
Sequencing.
composer audit, dependency-allowlist) to prevent reintroduction.Maintenance. Effectively infinite relative to value: archived code means every PHP/Laravel upgrade becomes a compatibility investigation with no upstream fix. Budget for fork ownership if retained; otherwise the maintenance win from removal is immediate and permanent.
Support. None. No maintainer, no security advisories, no community answers for modern versions. Internal escalation path is "whoever last touched the fork."
Scaling. The bus itself is thin — dispatch overhead is negligible; scaling is a function of the queue backend (Redis/SQS/database), not this package. Risk appears at scale in serialization compatibility and in the absence of middleware for retries, idempotency, and tracing that the modern framework bus offers.
Failure modes.
Ramp-up. Near-zero learning cost (the API mirrors the framework), but non-trivial context cost: engineers must be told why an archived duplicate of a core component exists, and must not pattern-match it into new code. That explanation burden is itself a reason to remove it.
Bottom line for the roadmap: classify as divest. Block new usage, schedule removal from any surviving legacy service as part of the next framework-upgrade window, and standardize on Illuminate\Contracts\Bus\Dispatcher. The only acceptable ongoing cost is a time-boxed, owner-assigned vendored fork for a legacy app with a dated exit plan.
How can I help you explore Laravel packages today?