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

Bus Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

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

  • Archived upstream, zero dependents. No security response, no compatibility patches, no issue triage. The 0-dependents signal means no ecosystem pressure to keep it working and no peer validation of edge cases.
  • Low adoption (46 stars, score 0.235). Thin community surface: few Stack Overflow answers, few battle-tested production footprints, minimal signal on failure modes.
  • Duplicate capability. Every feature it offers is reproducible in roughly 100–200 lines against the native dispatcher (->pipeThrough([...]) plus a base Command contract). The dependency buys convenience, not capability.
  • Silent-breakage surface. Middleware ordering, transaction wrapping, and handler resolution are exactly the places where a stale wrapper diverges from framework behavior after a Laravel upgrade.

Key questions

  1. What Laravel and PHP versions are in scope, and does the last release's constraint set actually resolve?
  2. Which specific middlewares do we need — validation, authorization, transactions, logging — and can we express them natively?
  3. Is there an existing internal command-bus convention we would be replacing or competing with?
  4. Who owns the fork if we adopt it, and what is the review cadence for upstream framework changes?
  5. Does anything need to be queued/serialized, or is all dispatch synchronous in-process?

Integration Approach

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:

  1. Reimplement, don't adopt (recommended). Create an internal package exposing the same shape: a 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.
  2. Fork and vendor. If existing code already depends on the package's exact contracts, fork it into a private repository (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

  1. Spike: prove the pattern on one command, in isolation.
  2. Decision gate: fork vs. reimplement vs. abandon.
  3. Establish the internal Command/Handler contract and middleware set.
  4. Migrate one bounded context (a single write-heavy domain) end to end.
  5. Roll out domain by domain; retire the third-party dependency before the next major Laravel upgrade.

Operational Impact

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

  • Upgrade breakage: framework upgrade lands, dispatcher internals shift, command dispatch fails at runtime rather than at build time.
  • Middleware ordering: validation vs. authorization vs. transaction ordering silently changes semantics (e.g., an authorization check that reads state a transaction has not committed).
  • Binding overrides: the package rebinding the container's Dispatcher affects code far outside the command bus.
  • Blast radius: because every write path flows through the bus, a single failure mode is application-wide rather than feature-scoped. This argues for strong integration tests around the pipeline itself, not just individual handlers.

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.

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.
mrnewport/laravel-plaid
mrnewport/laravel-repo
mrnewport/laravel-docsign
mrnewport/laravel-stow
mrnewport/laravel-flow
mrnewport/laravel-priceable
mrnewport/laravel-nestedterms
fredmeng/laravel-apidoc-generator
itstructure/laravel-multilingual-tools
pdustdar/elasticsearch
markupai/php-sdk
rlacerda83/lumem-microservice-shipment
uni-method/symfony-lib
tacticmedia/scim-server-bundle
neika-ai/symfony-bundle
mattleads/agent-publishing-bundle
glavweb/framework-bundle
glavweb/extra-bundle
glavweb/api-bundle
glavweb/admin-bundle