- Can I use onliner/command-bus-bundle in a Laravel application?
- This is a Symfony bundle, built around Symfony's bundle registration and service container conventions, so it does not ship a Laravel service provider, facade, or package auto-discovery. You can install it with Composer, but you would have to wire the container bindings and any middleware yourself or use a Symfony-bundle bridging package. For most Laravel apps a Laravel-native command bus or queue dispatch is the lower-friction path. Treat it as a Symfony-first dependency rather than a drop-in Laravel package.
- What does onliner/command-bus-bundle actually do?
- It implements a command bus that takes an explicit command object and routes it to its matching handler class. A middleware pipeline wraps the dispatch step so you can layer concerns such as logging, transactions, or async transport around handling. It also brings AMQP-powered messaging, meaning commands can be sent to a broker for asynchronous processing. The main value is clean separation between request/controller logic and the code that handles the work.
- Does v0.2.0 support PHP 8.2, and can I still run it on PHP 8.1 or 8.3?
- The only release artifact for v0.2.0 is the note "Updated to support php 8.2", which does not say whether the Composer constraint was widened or narrowed. If the constraint became something like ^8.2 only, projects on PHP 8.1 or PHP 8.3+ may be excluded and forced into --ignore-platform-reqs, which is an anti-pattern in CI. Inspect the composer.json diff between v0.1.x and v0.2.0 before assuming compatibility. That single check resolves the biggest integration unknown.
- How do I install onliner/command-bus-bundle with Composer?
- Install it with composer require onliner/command-bus-bundle, but pin the exact version, for example "onliner/command-bus-bundle": "0.2.0", rather than a caret range. On a 0.x line a caret range can silently pull in breaking changes, since semver makes no stability promise before 1.0. After installing, verify the resolved platform requirements and confirm your transitive symfony/* constraints still solve against your existing lockfile. Then register the bundle and its configuration in your application kernel.
- Does this package require an AMQP broker such as RabbitMQ?
- The package advertises AMQP-powered messaging, so asynchronous command transport expects an AMQP broker and a matching PHP extension or client library. Synchronous, in-process dispatch to handlers may work without a broker, but that depends on how the transport is configured and is not documented in the available release material. Confirm the transport layer and required extensions by reading the bundle's configuration and composer.json before planning infrastructure. For a Laravel app, that usually means adding a broker to your local and production environments.
- Is a 0.x version of this package safe to use in production?
- A 0.x release line carries no semver stability guarantee, so anything may break between minor versions, and the one-line changelog gives you little warning. The reasonable stance is to treat v0.2.0 as safe to prototype with rather than as an adoption decision. Pin the exact version, read the commit range rather than the release note, and keep an eye on the release cadence. Because there is no documented deprecation policy ahead of 1.0, budget for upgrade work.
- How do I test commands and handlers built with this command bus?
- Because commands and handlers are explicit classes, you can unit test handlers directly by instantiating them and passing a command object, with dependencies mocked as usual. For the bus and middleware pipeline, test that a dispatched command reaches the expected handler and that each middleware calls the next stage. Avoid hitting a real AMQP broker in unit tests; use an in-memory or synchronous transport where the bundle allows it. Specific testing helpers are not documented, so verify what the bundle exposes before relying on framework test utilities.
- How does middleware work in onliner/command-bus-bundle?
- Middleware wraps the dispatch step, so each middleware can act before and after the command reaches its handler, which is useful for logging, validation, transactions, or async transport switching. The exact registration mechanism depends on how the bundle exposes its service definitions, and the available documentation does not detail it. Expect to configure middleware through the bundle's service configuration rather than a Laravel-style pipeline array. Inspect the source to confirm ordering and whether middleware applies per command or globally.
- Is onliner/command-bus-bundle actively maintained, and what should I check before adopting it?
- The only available evidence is a single release note for v0.2.0 bumping PHP 8.2 support, with no changelog history, usage data, or source inspection, so maintenance confidence is low to moderate. A lifecycle-hygiene release is a mildly positive signal that the maintainer is tracking the runtime, but single-maintainer and abandonment risk remain unverified. Before adopting, check the composer.json constraint delta, the CI test matrix including Laravel versions, open issues and unmerged pull requests, and the release cadence. Treat the outcome as a screening decision, not an architectural commitment.
- What are the alternatives to this command bus for a Laravel or PHP application?
- On the Laravel side, the framework already provides command and job dispatching through its bus and queue system, which requires no extra dependency and integrates with existing service providers. League Tactician is a framework-agnostic command bus with middleware that works in both Symfony and Laravel, and Symfony Messenger is the closest first-party equivalent for Symfony applications, including AMQP transport. Compare those against this bundle on documentation quality, test coverage, and release history before choosing. If you need AMQP and Laravel queues already cover your transport needs, the built-in option is usually less risk.