- Can I use itmedia/command-bus-bundle in a Laravel application?
- Not out of the box. The package is a Symfony bundle that depends on Symfony's Kernel, bundle registration, container compilation passes and service tagging, none of which exist in Laravel's service-provider model. A 2021-era symfony/* constraint set also risks colliding with the Symfony components Laravel 10 and 11 ship, so composer require may fail outright. Treat the repository as a design reference rather than a dependency.
- How do I install itmedia/command-bus-bundle?
- Install it with composer require itmedia/command-bus-bundle and then register the bundle in your Symfony bundles.php or Kernel, since it has no Laravel service provider, config publishing or facade. There is no documented Laravel installation path, so inside a Laravel app you would need a fork or a wrapper that recreates bundle bootstrapping. For any adoption, run the install in a scratch Symfony app first to confirm which Symfony versions the constraint set actually allows.
- Which Symfony and PHP versions does the package support?
- Version 0.5.0 declares PHP 7.4 and 8.x support. The single-line release note from 2021-09-13 does not mention a Symfony version bump, so the symfony/framework-bundle constraint is undocumented and must be read directly from composer.json. Expect it to pin Symfony 4 or 5 era components, which is the main compatibility risk for modern installs.
- Does it run on PHP 8.2 or 8.3?
- The declared PHP 8.x support means the code should install and execute on modern PHP, which clears the earlier runtime blocker. What is unclear is whether 8.x means tested on 8.2 and 8.3 or merely does not crash on 8.0. A PHP 7.4 floor also signals a pre-enums, pre-readonly codebase without modern type declarations, which is a quality concern for a fork rather than a runtime failure.
- How are command handlers registered?
- Handlers are registered automatically through Symfony's DI container using service tagging, with autowiring supported for the command-to-handler wiring. The bundle keeps command classes decoupled from controllers by routing dispatch through the container. Whether resolution is convention-based, attribute-based or purely tag-based is not spelled out in the description and needs to be confirmed from the source before relying on it.
- Does it support middleware for validation, logging and transactions?
- Yes, the bundle advertises a middleware pipeline intended for validation, logging and transaction handling around command execution. The dispatch API covers commands and queries, so middleware can wrap both. It is not documented whether the bus implements PSR-11, PSR-14 or Symfony's MessageBusInterface rather than a bespoke contract, and no async transport path is mentioned, so assume synchronous-only until verified.
- Is itmedia/command-bus-bundle maintained and safe for production?
- The repository shows a single release line last touched on 2021-09-13, a one-line release note, roughly 3 stars, 0 dependents and a score around 0.045, with the description written only in Russian. A one-line release note after four-plus years is not active maintenance, and the bus factor is one. It is not a safe production dependency for critical write paths.
- What is the license and is there test coverage?
- The provided material does not state the license or any CI or test coverage, and the README excerpt is empty. Before forking or vendoring the code, check the repository for a LICENSE file, a CI workflow and a test suite. Lack of tests raises the cost of a fork considerably, since behaviour around middleware and handler resolution would have to be characterised from scratch.
- What are the Laravel-native alternatives to this command bus pattern?
- The idiomatic Laravel choices are the framework's own bus via dispatch(), pipelines and queued dispatch, plus league/tactician or Symfony Messenger if you want a dedicated library. A command bus is essentially a class-to-handler map run through a middleware pipeline, and Laravel's container plus Illuminate\Pipeline expresses it in roughly a hundred lines. That keeps the code inside conventions your team already understands rather than importing an unmaintained Symfony bundle.
- How would I port the command bus pattern from this bundle into Laravel?
- Re-implement rather than depend: define a CommandBus contract, plus HandlerMiddleware and TransactionMiddleware, and a CommandBusServiceProvider that binds a handler map or does attribute-driven discovery. Introduce it behind your own interface so the implementation stays swappable, and pilot it in one bounded context with real write traffic before widening use. If a Symfony service ever appears in the estate, evaluate the original bundle there first as a vendor candidate.