symfony/event-dispatcher
The EventDispatcher component lets application components communicate by dispatching events and listening to them. Register listeners on named events, control priority, and decouple your PHP code with a simple, standalone Symfony library.
illuminate/events (dispatcher, listeners, subscribers, queued listeners, wildcards). For a pure Laravel app, this package is not a capability upgrade. It becomes a real decision only in three cases: we consume third-party libraries that type-hint Symfony\Contracts\EventDispatcher\EventDispatcherInterface; we publish a package that must run on both Laravel and Symfony; or we want PSR-14 interop so listeners are portable across frameworks. Frame the decision as interop and dependency hygiene, not as a feature bet.symfony/event-dispatcher-contracts (interfaces only, near-zero footprint) versus the full component (dispatcher, priorities, stoppable events, immutable and traceable decorators). Choosing the contracts-only tier now keeps the option open without paying for it.TraceableEventDispatcher gives event-flow visibility and is the same tooling the Symfony profiler uses. Note for planning: recent patch releases fixed a memory leak in it for long-running processes and a reset-during-dispatch bug — relevant if we run queue workers, Octane, or long-lived CLI jobs.Adopt (or standardize on the contracts) when:
#[AsEventListener]) typed listeners with priorities and stoppable propagation, and the team already has Symfony muscle memory.Look elsewhere when:
symfony/symfony, not in this repo, so support means community channels plus commercial Symfony vendors.Data caveats before you commit to a slide: the "0 dependents" figure in the snapshot is almost certainly an artifact — this is among the most-depended-on PHP packages in the ecosystem — and the changelog is dominated by "no significant changes," which reads as stability, not stagnation. Re-verify both before quoting them.
To executives — one paragraph: "This is mature, MIT-licensed plumbing that lets parts of our application broadcast 'this happened' and lets other parts react without being wired directly together. It's the same component underneath Symfony and a large share of the PHP ecosystem, so the risk of adopting it is close to zero and the cost is close to zero. The honest caveat: our Laravel app already has an equivalent built in, so this isn't new capability — it's a standards decision. It pays off if we want extension points for partners or customers, if we plan to share code with Symfony-based systems, or if we want to avoid a future rewrite. It does not replace our queue system for background or cross-service messaging, and I'd push back on anyone framing it that way."
To engineering: "Small, stable API surface — dispatch, listeners with priorities, subscribers, stoppable propagation, plus immutable and traceable decorators. PSR-14 compliant. Actively patched, including memory-leak and dispatch-reset fixes that matter for workers and long-running processes. Choose your tier deliberately: contracts-only if you just want portable interfaces, full component if you want the dispatcher. Pin the Symfony line to match our PHP baseline — 8.x requires PHP 8.4; 6.4 and 7.x are the conservative options. Expect a short spike, not a project."
What to promise, and what not to: promise decoupling, extensibility, and a lower long-term maintenance bill than a bespoke bus. Do not promise hard percentage savings, compliance certification, or a drop-in swap for Laravel's events — those claims won't survive a design review, and the credibility cost is worse than the modest, real benefit. Propose a bounded pilot in the module with the highest change frequency and the most direct cross-service calls, with the success criterion being "new behavior added without editing existing service classes."
How can I help you explore Laravel packages today?