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

open-solid/bus

OpenSolid Bus is a lightweight command bus for Laravel that helps organize application logic into commands and handlers. It offers a clean API for dispatching commands, resolving handlers, and keeping controllers and services thin, focused, and easy to test.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit. open-solid/bus implements a CQRS-lite command/query bus: each action is modeled as an explicit command or query message, bound one-to-one to a handler. This is a well-understood pattern that maps cleanly onto Laravel's controller → service → domain flow and directly attacks the "fat controller / god service" problem. For a codebase where controllers are accumulating orchestration logic, validation, and transaction handling, the bus offers a disciplined seam: the controller becomes an HTTP adapter that constructs a message and dispatches it, while all behavior lives in a handler the container can inject into. The SOLID framing is credible — one-handler-per-action gives single responsibility, explicit bindings give dependency inversion, and the middleware pipeline gives open/closed extension for cross-cutting concerns without touching handlers. It is not full CQRS (no separate read/write stores, no event sourcing); treat it as a dispatch/router abstraction, not an architectural overhaul.

Integration feasibility. Low effort in principle. The package advertises a framework-agnostic core with a Laravel service provider, explicit command/query-to-handler bindings, a middleware pipeline (validation, logging, transactions), automatic container injection into handlers, and dispatch-and-assert testing without an HTTP request. That means: composer require, register the provider, declare bindings, and start dispatching. No schema migrations, no infrastructure dependencies, no runtime services to provision. The primary work is organizational (conventions, review discipline, test patterns) rather than technical. The "explicit bindings" choice is a trade-off: it is greppable and predictable, but it adds a registration burden and a class of misconfiguration bugs that auto-resolution would avoid.

Technical risk. This is the dominant concern and it is maturity, not capability. Three stars, zero dependents, and no downstream usage evidence mean effectively no community validation, no third-party battle-testing, and no signal that the API surface is stable. A last release dated 2026-10-09 should be verified — if it is a future-dated artifact, a placeholder, or a mistagged release, that alone is a release-hygiene red flag worth resolving before adoption. The score of 18.8 (with opportunity at 54.7) reads as "genuinely useful idea, insufficiently proven," which matches the qualitative picture. Single-maintainer risk is high; buskill is a small package, so the blast radius is contained and the core is likely portable or forkable, but you should assume you may own it. There is also competitive crowding: Laravel's own dispatch/queue pipeline, Illuminate\Bus, and several established third-party command buses already occupy this space, so the package must justify itself on ergonomics and the explicit-binding philosophy rather than unique capability.

Key questions.

  • Who maintains this, and is it an extraction from a production system (implying real-world hardening) or a greenfield side project?
  • What PHP and Laravel versions are supported, and is there a CI matrix proving it?
  • Does the middleware pipeline support transactions correctly — i.e., is the transaction opened outside the handler and does it roll back on handler exceptions?
  • Is there any queue/async dispatch path, or is everything synchronous?
  • How are unbound handlers, handler exceptions, and validation failures surfaced, and how do they map to HTTP responses?
  • What is the test coverage, and does the testing helper assert on dispatched messages or on handler side effects?
  • How does it compare, concretely, to Illuminate\Bus and to the established command-bus packages — is there a reason to prefer it beyond taste?

Integration Approach

Stack fit. Best suited to a Laravel application on a modern PHP 8.x runtime with an existing service-container-centric architecture. It fits teams already comfortable with dependency injection, interfaces, and message-style thinking. It is a poor fit for small CRUD applications where a controller plus form request plus Eloquent model is already the simplest correct thing — introducing a bus there adds indirection without buying separation. It is also a poor fit for teams without review discipline, because a bus only enforces one-handler-per-action if humans do.

Migration path. Adopt incrementally and prove value before committing. Do not rewrite existing controllers. Register the provider, define a small convention for where commands, queries, and handlers live, and refactor a single low-risk read path (a query) end to end. Then convert one write path with a transaction to exercise the middleware. Keep the old code path intact until the new one is covered by tests. Because the core is framework-agnostic, you can also isolate the bus behind your own thin interface in the first iteration, which caps the cost of reversing the decision later.

Compatibility. Verify PHP/Laravel constraints against your current and next-upgrade targets before adoption; a package this young may lag major framework releases. Check that it resolves handlers through Laravel's container rather than a parallel PSR container, and that it does not conflict with Laravel's native bus, queue, or event dispatching. Confirm that its middleware contract composes with existing Laravel middleware concepts rather than duplicating them confusingly. Also assess static analysis and IDE support: explicit bindings should be discoverable by tooling, but only if the package exposes them in a parsable way.

Sequencing.

  1. Spike: install in a branch, build one query and one command, confirm container injection and middleware behavior. Timebox to a day.
  2. Establish conventions: naming, directory layout, binding registration style, and a decision on whether to wrap the package behind an internal interface.
  3. Pilot in production behind a feature flag on a non-critical path; instrument dispatch and handler timings.
  4. Codify test patterns using the dispatch-and-assert helper so handler tests do not require HTTP.
  5. Roll out one domain module at a time, with a definition of done that includes tests and no controller-side business logic.
  6. Reassess at the end of the pilot: if maintainer responsiveness or release cadence is poor, fork or vendor the small core and keep the internal interface.

Operational Impact

Maintenance. Small dependency, small surface area — the code you must keep working is modest, which limits ongoing cost. The real maintenance exposure is upstream: a solo-maintainer package with no dependents may not track Laravel releases promptly, leaving you pinned to an older framework version or patching locally. Budget for the possibility of owning a fork. The explicit-binding model adds a maintenance tax of its own: every new action requires a registration entry, and stale bindings accumulate silently unless reviewed.

Support. Effectively no community support channel. Documentation appears to be a README-level description, which is enough to start and not enough to debug edge cases. Plan for internal ownership: designate one engineer as the point of contact, write an ADR capturing why the bus was adopted, and document the conventions the package does not. Do not expect Stack Overflow answers or timely upstream fixes.

Scaling. Operationally the package is benign: it is an in-process router with no I/O, no state, and no external dependency, so it scales horizontally exactly as the host application does. It can even improve scalability indirectly by making handler-level timing and boundaries visible, which helps identify hotspots. The open question is asynchronous execution — if dispatch is synchronous only, long-running work still needs explicit queueing, and the bus will not help you there. Architecturally, the one-handler-per-action granularity scales well with team size because it reduces merge conflicts and clarifies ownership, provided conventions are enforced.

Failure modes. The realistic failure set is: unbound or mis-bound handler producing a runtime resolution error; middleware ordered incorrectly so validation or transaction boundaries are wrong; a transaction opened inside the handler rather than around it, leaking partial writes; exceptions from handlers surfacing as generic 500s because HTTP mapping was never designed; silent success when a handler swallows an error; and binding drift after refactors. There is also a subtler failure mode — the bus becoming a dumping ground where every trivial method gets a command class, inflating the codebase and slowing navigation. Mitigate with a startup binding validation check, explicit exception-to-response mapping, transaction middleware verified by an integration test, and a review guideline defining what does not deserve a message.

Ramp-up. For engineers already fluent in Laravel DI and comfortable with interfaces, ramp-up is measured in hours: construct a message, dispatch it, write a handler, register a binding. The conceptual cost is in unlearning controller-centric habits and accepting the indirection. For junior or newly onboarded engineers, the cost is higher and mostly about conventions rather than the package — where messages live, how bindings are registered, what belongs in middleware versus handler. Invest in a short internal guide with two worked examples (one query, one transactional command) and a test template; that will do more for ramp-up than any upstream documentation this package is likely to provide.

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.
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
frankyso/ipaymu
3mdikram/worldmoneywords
snowsoft/config
itmosoft/laravel-subscriptions
larva/laravel-ai-qwen
adachsoft/api-version-bundle
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox
pairus/product-data
fayne/laravel-filament-cms-core