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

open-solid/bus is a lightweight command bus for Laravel that keeps controllers thin by routing each command to a dedicated handler. Built around SOLID principles, it separates dispatch from execution so every command has a single, testable responsibility.

  • Clean dispatch() API for sending commands to handlers
  • Automatic handler resolution through the service container
  • Middleware pipeline for logging, transactions, and validation
  • Framework-agnostic core usable outside Laravel
  • Extensible design for custom handlers and middleware
Frequently asked questions about Bus
What is open-solid/bus and what problem does it solve?
open-solid/bus is a simple Laravel command bus component that lets you dispatch commands to dedicated handler classes. It adds middleware support and encourages a clean separation of concerns, which fits SOLID-friendly application architecture. Instead of putting application logic directly in controllers, you route each command through the bus to its handler.
How do I install open-solid/bus in a Laravel application?
Install it with Composer using composer require open-solid/bus. Laravel package discovery should register the service provider automatically in typical applications. If your app does not use auto-discovery, register the package service provider manually according to the package documentation.
Which Laravel versions are supported by open-solid/bus?
The package is designed for Laravel applications, but exact framework version support depends on the release you install. Check the composer.json constraints and the repository releases before upgrading Laravel. That is the safest way to confirm compatibility for your project.
How do I create a command and a handler with open-solid/bus?
You define a command class that carries the input data and a dedicated handler class that contains the logic for that command. Then you map or register the command to its handler as described in the package documentation. The bus dispatches the command to the matching handler, keeping controllers and other entry points thin.
How does middleware work in open-solid/bus?
Middleware lets you wrap command dispatch with cross-cutting behavior such as logging, validation, transactions, or authorization. You add middleware to the bus pipeline through the package configuration or registration API. Each command then passes through the configured middleware before reaching its handler.
Can open-solid/bus be used for CQRS-style architecture?
Yes, it can support the command side of a CQRS-style design by separating commands from their handlers. It does not by itself provide event sourcing, read models, or a full CQRS framework. You can combine it with other Laravel patterns and packages to build those parts.
How should I test commands and handlers when using open-solid/bus?
You can unit test handler classes directly by instantiating them with test dependencies and calling their handle method. For integration tests, dispatch the command through Laravel's testing helpers or a test bus implementation and assert the expected side effects. Keep command classes as simple data objects so they are easy to construct in tests.
Is open-solid/bus suitable for production Laravel applications?
It is a lightweight command bus component, so suitability depends on the package's maintenance status and your version constraints. Review the repository, releases, and test coverage before adopting it in production. Because it follows a simple handler pattern, it can be a good fit for teams that want explicit command dispatch without heavy infrastructure.
What are alternatives to open-solid/bus for Laravel command buses?
Laravel's built-in bus and dispatchable job system can handle many command-style use cases. Other options include dedicated command bus packages such as league/tactician integrations or Symfony Messenger when you need a broader message bus. Compare middleware support, handler mapping, and Laravel integration before choosing.
Where can I report issues or check maintenance for open-solid/bus?
The source code and issue tracker are on the GitHub repository at github.com/open-solid/bus. Check the releases and commit history there to assess maintenance activity. Report bugs and feature requests through the repository's issue tracker.
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.
users-au/socialite-provider
twidpay/twid-logger
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