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
Tactician Command Events

Tactician Command Events Laravel Package

league/tactician-command-events

Adds command events to League Tactician, dispatching events around command handling so you can hook into the command lifecycle with listeners instead of cluttering handlers. A lightweight integration for PHP apps using Tactician.

View on GitHub
Deep Wiki
Context7

Tactician Command Events

Frequently asked questions about Tactician Command Events
What does league/tactician-command-events do?
It is a League Tactician middleware that lets a command record events while it is being handled and releases those events only after handling completes successfully. Instead of injecting an event dispatcher into every handler, you collect domain events on the command and let the middleware publish them. It is a small integration intended for applications already using Tactician's command bus.
Is league/tactician-command-events compatible with Laravel?
Not directly. Laravel does not use Tactician's bus pipeline by default, and the package ships no Laravel service provider, facade, configuration, or documented bridge. You would need a small adapter to forward its events to Laravel's EventDispatcher, and its old Composer constraints will likely conflict with Laravel 9 through 12 and PHP 8.x.
How do I install league/tactician-command-events?
You install it with Composer using composer require league/tactician-command-events. Be aware that the last release was in 2015 and is pinned to old league/tactician and league/event versions, so a modern PHP 8 project will probably hit dependency conflicts. Use ignore-platform-reqs only for a short compatibility spike, never for production.
Does league/tactician-command-events support PHP 8 and Laravel 11?
There is no evidence of PHP 8 or Laravel 11 support. The last release was 2015-12-31, its constraints are PHP 5.6-era, and there is no modern test coverage. Laravel 11 requires PHP 8.2 or newer, so you would need to fork the package and raise its PHP and Tactician constraints before it could install cleanly.
Can I use it to release events only after a database commit?
The package releases events after the command handler returns, not after a database transaction commits. Handler return and commit are not the same thing when you wrap command handling in a transaction. For commit-safe dispatch you need Laravel's DB::afterCommit() or an outbox pattern instead.
What are the alternatives to using Tactician command events in Laravel?
Laravel's native command bus, event dispatcher, queued listeners, and DB::afterCommit() hook cover the same use case with first-party support. You can also reimplement the recording pattern in under about 100 lines using a small interface or trait on commands plus a middleware adapter. An outbox package is the better choice when delivery guarantees matter.
Is league/tactician-command-events still maintained?
Effectively no. The last release was in 2015, the package has around 14 stars and zero dependents, and there is no evidence of modern test coverage. If you adopt it, you own the code and should budget for periodic compatibility patches rather than expecting upstream releases.
How do I test command events with this package?
Test at the middleware boundary: assert that a command records events during handling and that those events are cleared and released only after successful handling. Also test that a failed handler does not release events and that event ordering is what you expect. The package does not document any official testing utilities, so you would build these assertions yourself.
What delivery guarantees does league/tactician-command-events provide?
Delivery is best-effort and in-process, with no persistence, retries, or duplicate detection. If a listener fails after events are released, delivery may be partial and there is no built-in recovery. Use a transactional outbox if you need at-least-once delivery.
Should I fork league/tactician-command-events or reimplement it in my app?
Reimplement it in your application by default. The pattern is small, and doing it in-app removes an abandoned dependency, makes transaction semantics explicit, and keeps ownership internal. Fork the package only if you already run Tactician and need the smallest possible change; in that case raise the PHP and Tactician constraints and add PHP 8 tests.
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