alt-three/bus
Alt Three Bus is a lightweight command bus for Laravel that dispatches commands to handlers, supports middleware, and integrates with the container to keep business logic clean and decoupled.
Architecture fit
AltThree/Bus is a thin opinionated layer over Laravel's native command bus (Illuminate\Bus\Dispatcher, Illuminate\Contracts\Bus\Dispatcher). Its value proposition is a middleware pipeline around command handling — commonly validation and authorization middleware that let a Command object declare its own rules() and authorize() logic, plus handler resolution via the service container. For a Laravel codebase already using controller/service classes, this is a plausible CQRS-lite structuring tool: it moves request-shaped concerns (validation, policy checks) out of controllers and next to the write operation they guard.
Architecturally, that is a low-risk pattern implemented in a high-risk artifact. The package does not introduce a broker, a serializer, or a new transport; it is in-process and synchronous unless you additionally queue. The conceptual coupling is to Laravel's container and dispatcher contracts, which are stable and well documented. The real question is not whether the pattern fits — it does — but whether this specific implementation is ever the right vehicle for it in 2024+.
Integration feasibility
Mechanically trivial for a Laravel application on a compatible version: composer require alt-three/bus, register the service provider (auto-discovery on Laravel 5.5+), define Command classes and Handler classes, and dispatch. No infrastructure, no new runtime, no schema changes. A spike can prove it in under a day.
The constraint is version compatibility. The last release is 2020-07-25 and the repository is archived. That release window corresponds to Laravel 5.x–7.x and PHP 7.x. On Laravel 9/10/11 (PHP 8.1+), expect composer conflicts on illuminate/* constraints, and — if force-installed — runtime breakage from internal dispatcher changes. Realistically, integration into a current Laravel app means forking or vendoring, not requiring.
Technical risk
->pipeThrough([...]) plus a base Command contract). The dependency buys convenience, not capability.Key questions
Stack fit
Good only for a Laravel app pinned to the 2020-era framework line, or for a team willing to own a fork. Poor fit for greenfield work — the native bus plus a small internal Command/Handler contract delivers the same ergonomics with zero third-party surface.
Migration path
Two viable routes, in preference order:
Command base class with rules()/authorize(), a Handler contract, and a dispatcher wrapper that calls app(Dispatcher::class)->pipeThrough([ValidateCommand::class, AuthorizeCommand::class]). This preserves the developer experience, keeps the code on supported framework APIs, and is a ~1-day task.vcs or path repository), relax the illuminate/* constraints, and pin it. Treat it as internal code, not a dependency.For a brownfield app currently on the package: inventory all Command classes and handlers, verify each middleware's behavior against the native pipeline, then swap the base classes in a single mechanical PR with the handler logic untouched.
Compatibility
Do not assume Composer resolution succeeds on modern Laravel. Validate up front with a throwaway branch: install, run the test suite, and exercise one command with validation failure, one authorization failure, and one success path. Also check whether the package's service provider aliases or overrides the native Dispatcher binding — that is the highest-blast-radius change it can make.
Sequencing
Command/Handler contract and middleware set.Maintenance
The dominant cost. An archived dependency is a permanent line item: every Laravel major upgrade requires us to patch composer.json constraints and re-verify dispatcher internals. Budget a fixed review each framework upgrade cycle, or eliminate the dependency and the cost with it. The reimplement path moves this to near zero because the code uses only public, stable contracts.
Support
No upstream support channel. Internal escalation means reading the source — feasible here, since the package is small, but it means the on-call engineer is debugging someone else's 2020 assumptions at 2 a.m. Documentation is README-level; expect tribal knowledge to be the real reference.
Scaling
Not a concern at the infrastructure layer: the bus is in-process and stateless, so throughput scales with the application. If commands are queued, scaling behavior is Laravel's queue behavior, not the package's. The scaling risk is organizational — the number of engineers who understand the bus conventions versus the number of commands flowing through it.
Failure modes
Dispatcher affects code far outside the command bus.Ramp-up
Low for engineers already fluent in Laravel — the concepts map directly onto the native bus. The friction is the undocumented parts: how the package resolves handlers, how it treats nested dispatch, and what it does when a handler is missing. Mitigate with a short internal ADR and a canonical example command committed to the repo. If the team is not already Laravel-native, skip this package entirely; the pattern's benefit does not justify explaining a defunct dependency alongside it.
How can I help you explore Laravel packages today?