Dispatch is synchronous. SynchronousEventDispatcher retrieves matching listeners from OrderedListenerProvider and invokes them immediately in the current call stack.
There is no queue, retry layer, transport abstraction, or deferred execution path.
Listeners are matched by PHP type checks:
- a listener for a concrete event class receives that event class
- a listener for a parent type or family interface also matches compatible events
This allows listeners to target either a specific event or a broader event family.
Related:
Execution order is deterministic:
- higher priority runs first
- listeners with the same priority run in registration order
OrderedListenerProvider preserves a sequence number for each registration so ties remain stable.
Subscribers are flattened into normal listener registrations. Their subscriptions are added to the same ordered listener list and participate in the same priority and sequence rules.
Propagation stopping is optional. If an event implements StoppableEventInterface, the dispatcher checks isPropagationStopped():
- before invoking each listener
- after invoking each listener
Once propagation is stopped, no remaining listeners are executed.
Related: