Skip to content
CAI
Software that uses CAICheck a score

symfony/event-dispatcher

52.3

Adequate · 13 November 2026

1.8k

lines of production code

PHP

primary language

7

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

Features

Compiler passes for event aliases, hot-path optimization, and listener compilation

The DependencyInjection component introduces three new compiler passes to enhance event dispatcher configuration and performance. AddEventAliasesPass allows bundles to register event aliases, hot-path events, and no-preload events via container parameters. CompileListenersPass optimizes the event dispatcher by converting runtime addListener calls into a static map for CompiledEventDispatcher, improving dispatch speed for lazy-loaded listeners. RegisterListenersPass handles the registration of tagged event listeners and subscribers, supporting before/after constraints for ordering, hot-path tagging, and no-preload optimization, while deprecating direct configuration of hot-path and no-preload events in favor of the new AddEventAliasesPass.

DependencyInjection · high confidence

EventDispatcher component introduces compiled and scoped dispatchers with stricter listener management

The EventDispatcher component now includes a new CompiledEventDispatcher for high-performance dispatching using a listener map defined at compile time, and a ScopedEventDispatcher to allow temporary listeners without mutating the shared dispatcher. The legacy Event class has been removed in favor of the contract-based Event, and the interface now extends ListenerIntrospectionInterface. Additionally, the getSubscribedEvents() method now supports named keys with 'before' and 'after' constraints for ordering, and the ImmutableEventDispatcher is provided for read-only access. The old Event class is deleted, and the EventDispatcher now implements the updated interface with stricter type hints and optimized listener handling.

(repo-wide) · high confidence

Introduce AsEventListener attribute for autoconfiguring event listeners

A new AsEventListener attribute has been added to the EventDispatcher component, allowing developers to declaratively configure event listeners directly on classes or methods. This attribute supports specifying the target event, the handler method, execution priority, and the specific event dispatcher to use. It also introduces ordering capabilities via 'before' and 'after' constraints, enabling precise control over the execution sequence of listeners relative to other services, classes, or specific methods.

Attribute · high confidence

New debug components for event listener tracing

Added TraceableEventDispatcher and WrappedListener classes to the Debug namespace. These components wrap the standard event dispatcher to collect data on which listeners are called, their execution times via the Stopwatch, and whether they stop event propagation. This enables the profiler to display detailed 'Logs & Events' information, including called/not-called listeners and their priorities, improving debugging visibility for event-driven applications.

Debug · high confidence

Test coverage

Added test fixtures for AsEventListener attribute scenarios; Added tests for EventDispatcher compiler passes; Added tests for TraceableEventDispatcher and WrappedListener; Added tests for new EventDispatcher components and refactored existing test suite.

Dependencies

Initial composer.json for Symfony EventDispatcher with PHP 8.4+ requirement

This change introduces the composer.json manifest for the symfony/event-dispatcher component. It establishes a minimum PHP version of 8.4.1 and defines dependencies on symfony/deprecation-contracts (^2.5\|^3) and symfony/event-dispatcher-contracts (^3.8). The manifest also specifies development dependencies for testing and integration (such as symfony/config, symfony/dependency-injection, and symfony/framework-bundle) and sets up PSR-4 autoloading while excluding test files from the classmap.

(dependencies) · high confidence

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 52 → 52 (-0.1)
  • Rubric changed (rubric-2026.10.5 → rubric-2026.11.4) — scores are not directly comparable.

Lenses

  • Code Health 69 → 68 (-0.4)
  • Architecture 99 → 97 (-1.2)
  • Maturity 39 → 39 (+0.1)
  • Readiness 47 → 47 (+0.0)
  • Security 100 → 100 (+0.0)

Resolved (3)

  • Documentation: no installation or build instructions (README.md)
  • Hotspot: DependencyInjection/RegisterListenersPass.php (DependencyInjection/RegisterListenersPass.php)
  • Off-boarding risk: anonymized user #1

New (2)

  • Edited copy of a member (19 corresponding lines) (EventDispatcher.php)
  • Off-boarding risk: anonymized user #1

Changes since last survey

  • 2 commits — 2 feature/other, 0 fixes

By area

  • (root) — 2 commits

Notable commits

  • change: Require v3.8.1 of the contracts
  • change: Tidy up the 8.2 changelogs and UPGRADE-8.2.md, second round

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

symfony/event-dispatcher was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 13 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit b18c4241475a44e262ceee9066eac8927324a64c — the exact code this score is about.
  • Scored under rubric-2026.11.4 — the same rubric and the same method as every other entry in this index.
  • Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.65+preprod-859b6d22580d.