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

priyank780/command-bus-bundle

A command bus for Laravel and PHP applications that routes commands to their handlers, with support for middleware pipelines and clean separation between dispatching and handling logic.

View on GitHub
Deep Wiki
Context7

Symfony integration for CommandBus library

Frequently asked questions about Command Bus Bundle
What is priyank780/command-bus-bundle used for?
It is a Symfony integration bundle for the CommandBus library. It helps route commands to their handlers and supports middleware pipelines. The underlying CommandBus library is described as useful for Laravel and general PHP applications as well.
Can I use command-bus-bundle in a Laravel application?
The package itself is explicitly a Symfony integration, so Laravel is not its primary target. The underlying CommandBus library is described as suitable for Laravel and PHP applications, but the bundle wiring is Symfony-oriented. In Laravel you may need to integrate the library manually or use a Laravel-specific adapter.
How do I install priyank780/command-bus-bundle?
Install it with Composer using composer require priyank780/command-bus-bundle. Then register the bundle in your Symfony application if it is not auto-discovered. For Laravel, check whether the package provides a service provider before relying on auto-discovery.
How does the command bus route commands to handlers?
You dispatch a command object to the bus, and the bus maps that command to its corresponding handler. This keeps dispatching logic separate from handling logic. The handler then executes the business logic for that command.
What are middleware pipelines in this command bus?
Middleware pipelines let you wrap command handling with reusable behavior such as logging, validation, transactions, or authorization. Each middleware can process the command before or after the handler runs. This keeps cross-cutting concerns out of individual handlers.
Do I need Symfony to use this command bus package?
This specific package is a Symfony bundle, so Symfony is its intended integration path. The CommandBus library underneath is described as usable in Laravel and other PHP applications. Without Symfony, you would typically use the underlying library directly rather than the bundle.
Does command-bus-bundle support Laravel's service container and dependency injection?
The provided context does not confirm a Laravel service provider or container integration. The package is a Symfony bundle, so its documented dependency injection integration is Symfony-oriented. Laravel developers should verify container support in the repository before adopting it.
How should I test commands and handlers with this package?
Test handlers as plain PHP classes by instantiating them with mocked dependencies and calling their handle method. For the bus, you can test that dispatching a command reaches the expected handler, and add middleware tests for pipeline behavior. Keep command objects simple and immutable to make tests predictable.
Is priyank780/command-bus-bundle production-ready?
The package provides a structured command bus with middleware support, which is a sound production pattern. However, the provided context does not include maintenance status, release history, or test coverage. Review the GitHub repository and Composer constraints before using it in production.
What are alternatives to this command bus for Laravel?
Laravel developers often use Laravel's own bus and queue system or dedicated command bus packages. Symfony developers may use Symfony Messenger or the underlying CommandBus library directly. Choose based on whether you need Symfony bundle integration, Laravel-native features, or framework-agnostic dispatching.
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.
robertmarney/lara-hierarchial-collections
simonschaufi/rule-doc-generator
emissaoja/emissaoja
blackbricksoftware/gravityforms-civicrm-form-processor
al-rahabi/fancy-crud
jinas/dhivatar-component
mltstephane/laravel-quality
bernskiold/laravel-talentlms
bernskioldmedia/laravel-form-architect
youbar/easy-crud
c-point-labs/laravel-hostyourai
dbravoan/dbcms-admin-theme-dbcms
dbravoan/dbcms-theme-db-cyber
dbravoan/dbcms-blocks-basic
dbravoan/dbcms-module-content-audit
dbravoan/dbcms-module-ai-assistant
paygate-to/paygate-php
padosoft/askmydocs-connector-base
defstudio/supercharged-carbon
bernskioldmedia/laravel-matomo