micro-module/command-bus
A lightweight command bus for Laravel micro-modules that dispatches commands to their handlers, supports middleware pipelines, and keeps controllers thin by separating request handling from business logic.
Architecture fit
micro-module/* packages can dispatch commands to each other without a direct compile-time dependency. That is the only justification that survives scrutiny; if it is merely a dispatcher implementation, it duplicates functionality Laravel already ships.Illuminate\Contracts\Bus\Dispatcher, dispatch(), Bus::chain(), Bus::batch(), the $pipeline middleware array, ShouldQueue) covers dispatch mechanics, middleware, and async transport out of the box and is maintained by the framework. A third-party bus must therefore add conventions — naming standards, payload envelopes, result objects, module routing — or it adds nothing.illuminate/*. Framework-agnostic would make it viable as a vendor-neutral contract layer; bound to Laravel 7/8 constraints it is a legacy artifact.Integration feasibility
composer require micro-module/command-bus is trivially shaped, but constraint resolution is the blocker. A release dated 2021-05-18 predates Laravel 9/10/11 and mainstream PHP 8.1+. Expect illuminate/support/illuminate/container capped at ^7|^8, meaning install into a modern application fails or requires --ignore-platform-reqs, replace, or a fork. Those are red flags, not workarounds.Technical risk: high to prohibitive. Single maintainer, four years without release, no published support matrix, unknown test coverage, no security advisory channel, and no successor package.
Key questions to close before any decision
illuminate/*, and at what version ceiling?DB::transaction?micro-module/* family maintained, or is this an orphaned fragment of one person's side project?Verdict: do not adopt. Use Laravel's native bus, and if cross-module contracts are genuinely needed, publish a 100-line internal interfaces package you control.
Stack fit
Migration path
App\Contracts\CommandBus with dispatch(object $command): mixed, bind an adapter, and inject the interface. Swapping to Illuminate\Contracts\Bus\Dispatcher or a fork then becomes a one-line container rebinding.composer.json as a VCS repository and treat it as first-party code.Compatibility
composer why-not micro-module/command-bus, composer outdated, and a dependency audit in CI. Add Larastan/PHPStan at a strict level plus a contract test suite around the interface before any merge.Sequencing
App\Contracts\CommandBus wrapper; timebox to two days.Maintenance
Support
Scaling
ShouldQueue, heavy commands will block requests. Verify this early; it is the most likely reason to reject it.Failure modes
BindingResolutionException deep in the stack.Ramp-up
How can I help you explore Laravel packages today?