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
Command Bus Bundle

Command Bus Bundle Laravel Package

konradpodgorski/command-bus-bundle

A command bus package for PHP/Laravel that dispatches commands to their handlers, promoting clean separation between application logic and infrastructure. It provides a structured way to organize command execution and middleware-style handling.

View on GitHub
Deep Wiki
Context7

Symfony integration for CommandBus library

Frequently asked questions about Command Bus Bundle
Is konradpodgorski/command-bus-bundle a Laravel package or a Symfony bundle?
It is a Symfony bundle. The repository uses Symfony bundle conventions such as a Bundle class, DI extension, compiler passes, and service tags. Laravel does not have bundles or compiler passes, so the package's Symfony container wiring is not portable to a Laravel application. Laravel developers should treat it as a Symfony package, not a Laravel command bus.
Can I install konradpodgorski/command-bus-bundle in a Laravel app with Composer?
A clean composer require is unlikely to be the right move, and it may fail. The bundle will declare Symfony and PHP constraints that can conflict with a modern Laravel application's illuminate/* and PHP 8.1+ requirements. Even if installation resolves, you would still need to reimplement the Symfony bundle wiring because Laravel does not run bundles. Use Laravel's native bus instead of adding this dependency.
Does command-bus-bundle support Laravel 10 or Laravel 11?
There is no Laravel version support to rely on because this is a Symfony bundle. Laravel 10 and 11 already provide a first-class command bus through Illuminate\Bus, including dispatch(), bus middleware, queued commands with ShouldQueue, and Bus::chain() or Bus::batch(). If you need command-to-handler separation in Laravel, use the framework's dispatcher rather than a Symfony bundle.
What is the Laravel equivalent of this bundle's dispatch and middleware pipeline?
Laravel's equivalent is Illuminate\Bus\Dispatcher. You call dispatch() to send a command to its handler, and you can attach bus middleware for validation, transactions, logging, or other cross-cutting concerns. Laravel also provides queue-backed async execution via ShouldQueue and orchestration via Bus::chain() and Bus::batch(). These are framework-maintained features, so you do not need a separate command-bus bundle.
How do attribute-based or tag-based handler registration compare with Laravel?
Attribute- and tag-based registration is Symfony DI wiring: tags and compiler passes tell the Symfony container which services are handlers. Laravel does not use service tags or compiler passes for command handlers; its container resolves the handler from the handle method's type-hinted command. In practice, Laravel's approach means less registration configuration and no bundle-specific extension points. You would not reuse the bundle's registration model in Laravel.
Does command-bus-bundle support queued or asynchronous commands like Laravel ShouldQueue?
The available description focuses on synchronous dispatch through a middleware pipeline and does not document async or queued handling. By contrast, Laravel's native bus supports ShouldQueue, queue connections, retries, and chained or batched commands. If asynchronous command handling is a requirement, Laravel's built-in dispatcher is the safer and more complete option. Treat the Symfony bundle as synchronous-only unless its source proves otherwise.
How should I test command handlers and dispatch in Laravel compared with this bundle?
In Laravel, you test command handlers as ordinary classes by resolving them from the container or calling them directly, and you can assert dispatch behavior with Bus::fake() and related queue fakes. The Symfony bundle's testing story would depend on Symfony's container and bundle test tooling, which does not carry over to Laravel. For a Laravel application, testing native commands and jobs avoids the need to mock or boot a foreign bundle. Check the bundle's own test suite and PHP version support only if you are evaluating it for Symfony.
Is command-bus-bundle safe and maintained for production use?
The assessment shows high maintenance risk: zero stars, zero dependents, a single maintainer, and a low adoption score, so there is little production usage to borrow confidence from. The bigger issue for Laravel teams is that adopting it would create a permanent fork obligation for a capability Laravel already owns. For Symfony projects, a well-adopted option such as Symfony Messenger would be a stronger production choice. Before any use, verify commit activity, PHP constraints, test coverage, and license terms.
How do I migrate a Symfony command bus bundle setup to Laravel?
Do not shim the Symfony bundle into Laravel. Port the intent instead: turn commands into Laravel command or job classes, move handler logic into handle methods, and use dispatch(), bus middleware, and ShouldQueue for the same separation. Laravel's container will resolve handlers by type-hint without Symfony tags or compiler passes. A phased Symfony-to-Laravel migration should target Laravel's dispatcher on the Laravel side and keep the Symfony bundle only where Symfony still runs.
What alternatives should Laravel developers consider instead of command-bus-bundle?
For Laravel, the primary alternative is the framework's own Illuminate\Bus dispatcher, which covers sync dispatch, middleware, queues, chains, and batches without extra dependencies. If you need a framework-agnostic command bus outside Laravel, evaluate well-adopted libraries on their own merits rather than a low-adoption Symfony bundle. For Symfony applications, Symfony Messenger is the natural comparison. The key decision is stack fit: use Laravel's bus in Laravel and Symfony's ecosystem tools in Symfony.
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.
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
adachsoft/api-version-bundle
elsayed85/laravel-api-exceptions
ouhssini/laravel-demo-mode
daworks/ncloud-outbound-mailer-driver
gp247/cms
ignibyte/aic-gates
nexa-merchant/blog
novasa/laravel-language-center
opencage/geocode
adolfoholzer/parameters
livenetworks/ln-starter
shitoudev/permissionmanager