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

garlic/bus

garlic/bus is a Laravel package that adds a bus abstraction for dispatching commands or messages to their handlers, helping keep controllers thin and application logic organized. It is a small, early-stage package best suited to simple projects or experimentation.

View on GitHub
Deep Wiki
Context7

Symfony 4 Message Bus bundle for Garlic microservices

Frequently asked questions about Bus
Can I install garlic/bus in a Laravel application with Composer?
No, not in any usable way. Although the package is described as a Laravel command bus, the repository is a Symfony bundle called BusBundle that registers services into Symfony's dependency injection container and hooks the Symfony kernel. Laravel has no bundle system and no services.yaml compilation pass, so requiring the package into a Laravel app does not produce a working bus. You would need to run a separate Symfony service and communicate over the network, or write an adapter that reimplements the wiring inside a Laravel service provider.
Does garlic/bus work with Laravel 10 or Laravel 11?
Not out of the box. Because it is a Symfony bundle, its dependency constraints target the Symfony 4 and PHP 7.x era, which collides with the requirements of Laravel 9, 10, and 11. The 1.6.17 patch release does not change the integration story. Check the composer.json constraints yourself before assuming compatibility, and expect dependency conflicts.
Is garlic/bus a Laravel package or a Symfony bundle?
Despite the Laravel-oriented description, it is a Symfony bundle. It resolves handlers through Symfony's service container and kernel event system rather than Laravel's container contract. The repository does not ship a Laravel service provider integration path, so any Laravel claim should be treated as aspirational rather than supported.
How do I dispatch a command to a handler using garlic/bus?
In its native Symfony context you define a command object, map it to a handler that the bundle resolves from the DI container, and dispatch it through the bus service. You cannot follow that same flow in Laravel without rebuilding the bundle's wiring inside a service provider. The repository does not document a Laravel dispatch API.
Does garlic/bus support middleware for validation, transactions, and logging?
The package advertises a middleware pipeline for cross-cutting concerns such as validation, transactions, and logging. However, that pipeline is configured through Symfony service definitions, not through Laravel's middleware or pipeline conventions. Porting it into Laravel means rebuilding the configuration layer yourself, and there is no Laravel-facing documentation to work from.
Can garlic/bus dispatch commands to a queue for background work?
The overview mentions queue-aware dispatching for background work, but only at a high level. There is no published wire format, transport detail, or retry semantics in the documentation or release notes. For Laravel queues you are better served by native jobs or a maintained Laravel command bus package.
Is garlic/bus safe to use in production?
It is not recommended. The technical assessment rates the risk as high due to architecture mismatch with Laravel, unverified maintenance, provenance from a single organisation's estate, negligible adoption, and a recent Fix event processor patch with no changelog covering 1.6.0 through 1.6.16. A message bus sits on the trust boundary between services, and silent failures such as dropped, duplicated, or misrouted events are exactly the defect class that patch implies. Treat it as experimental at best.
How do I test a command bus like garlic/bus in a Laravel project?
Since the package cannot be installed into a Laravel app, there is no meaningful Laravel testing story for it. If you are evaluating the Symfony bundle directly, boot a Symfony kernel with the bundle registered and assert that commands reach their handlers and that middleware runs in order. In a Laravel project, test your own abstraction instead, using container mocks for a command interface, a handler resolver, and a pipeline.
What are good alternatives to garlic/bus for a Laravel command bus?
Start with Laravel's own bus and queue system plus its pipeline component for middleware. League's Tactician is a mature, framework-agnostic option, and Symfony Messenger is the natural fit if you are genuinely on Symfony. Any of these provides documented Laravel integration, an active maintenance record, and a testable contract, none of which garlic/bus currently offers for Laravel.
Is garlic/bus still maintained, and what changed in version 1.6.17?
Maintenance is unverified. The existence of 1.6.17 corrects the earlier assumption that the project had a single 2019 release, but there is no changelog for 1.6.0 through 1.6.16 and no stated support or security policy. The release note reads only Fix event processor, a patch-level bug fix with no features, breaking changes, or migration notes. Confirm who cut the release, on what date, and whether it changed the PHP or Symfony constraints before relying on it.
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.
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox
pairus/product-data
fayne/laravel-filament-cms-core