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 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

Technical Evaluation

Architecture fit. The package addresses a real CQRS/domain-event concern: recording events on a command during handling and releasing them only after the command completes successfully. That pattern fits a command-bus architecture and maps conceptually to Laravel’s DB::afterCommit() plus domain events. The concrete fit is weak, however: it is a Tactician middleware plugin, and Laravel applications do not use Tactician’s bus pipeline by default. Leverage is therefore limited to teams already operating a Tactician command bus, or willing to adopt one alongside Laravel’s native bus.

Integration feasibility. Low for a modern Laravel codebase. The last release was 2015-12-31, with 14 stars and zero dependents. Composer constraints are likely PHP 5.6-era and pinned to old league/tactician / league/event versions, which will conflict with Laravel 9–12 and PHP 8.x. There is no Laravel service provider, configuration, facade, or documented Laravel bridge. The package is MIT-licensed, so forking or vendoring is legally straightforward, but it is not a drop-in integration.

Technical risk. High. Key risks are abandonment, PHP 8 incompatibility, transitive dependency conflicts, undocumented event ordering and transaction semantics, and no evidence of modern test coverage. The package also creates a second eventing mechanism beside Laravel’s dispatcher, which increases cognitive load and makes debugging dispatch order harder. The low package score (0.49) and opportunity score (23.92) reinforce that this is not a strategically valuable dependency.

Key questions.

  • Are we already running Tactician, and at which version? If not, why introduce it?
  • Do we need “release events only after successful handling,” or is Laravel’s transactional event dispatch sufficient?
  • What are the delivery guarantees: at-most-once, at-least-once, or best-effort? Are duplicates acceptable?
  • Must events be released after database commit, or merely after handler return?
  • Who owns a fork if we adopt it, and what is the exit plan?

Integration Approach

Stack fit. Poor for greenfield Laravel. Good only as a narrow adapter inside an existing Tactician-based application. Laravel’s native command bus, event dispatcher, queued listeners, and afterCommit hooks cover the same use case with first-party support.

Migration path. Two viable paths:

  1. Fork/vendor the package, raise PHP and Tactician constraints, add PHP 8 tests, and publish via a private Composer repository.
  2. Reimplement the pattern in-app (likely under ~100 lines): an RecordsEvents interface/trait on commands, a middleware that collects and clears events after handling, and an adapter that forwards them to Laravel’s EventDispatcher.

The second path is usually preferable: it removes the dependency, makes transaction semantics explicit, and keeps ownership internal.

Compatibility. Verify PHP 8.1+ compatibility, Tactician 1.x/2.x compatibility, and league/event version constraints. Laravel’s dispatcher is not a drop-in PSR-14 implementation in all versions, so a small adapter may be required. If the app uses database transactions, event release must be coupled to commit, not just handler return.

Sequencing.

  1. Inventory existing Tactician and command-bus usage.
  2. Run a short compatibility spike in a branch; do not commit to production adoption yet.
  3. Decide fork versus in-app reimplementation; default to reimplementation.
  4. Define delivery semantics and transaction boundaries explicitly.
  5. Pilot on one bounded context with low-risk commands.
  6. Add observability: event counts, dispatch failures, duplicate detection.
  7. Document an exit path to native Laravel events or an outbox.

Operational Impact

Maintenance. Upstream maintenance is effectively zero; the adopter owns the code. The surface area is small, so a vendored middleware is manageable, but Composer resolution and PHP upgrades become recurring toil. Budget for periodic compatibility patches rather than expecting upstream releases.

Support. No meaningful community support: 14 stars, zero dependents, and no releases since 2015. There will be no security advisories or timely fixes. Internal ownership, documentation, and tests are mandatory before production use.

Scaling. The middleware itself is stateless and cheap. The real scaling concern is synchronous event release: listeners performing I/O will inflate command latency. Queue listeners where possible, and be explicit about whether events are dispatched inside or outside the transaction. Throughput will be bounded by listener work, not by the middleware.

Failure modes.

  • Events lost if the process crashes between command handling and event release.
  • Events dispatched before commit, then rolled back, causing phantom events.
  • Duplicate dispatch on retries or partial failures.
  • Listener exceptions bubbling up and failing a command whose work already succeeded.
  • Ordering ambiguity when multiple events are recorded on one command.
  • Two event systems diverging in behavior and observability.

Ramp-up. Low for engineers already familiar with Tactician; moderate for Laravel-only teams who must learn a second bus, middleware pipeline, and event lifecycle. The conceptual overhead is disproportionate to the package’s size.

TPM recommendation. Do not adopt as a new production dependency. If the pattern is required, port the small middleware into the application, bind it to Laravel’s dispatcher and transaction lifecycle, and treat the original package as reference material only.

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.
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
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