SIGN IN SIGN UP

[EventDispatcher] Deprecate mutating the event dispatcher of the container at runtime

Adding a listener to the dispatcher of the container after it is built defeats
the listener map CompileListenersPass writes: the dispatcher falls back to a
plain EventDispatcher for the rest of the process.

CompileListenersPass now follows the decoration chain, so the listeners of the
"event_dispatcher" service are compiled into the dispatcher the profiler
decorates rather than left on the decorator. The service is therefore a
CompiledEventDispatcher in debug too, where mutating it triggers a deprecation
ahead of production.
N
Nicolas Grekas committed
3c13c538d6c534d5ef38f3d3d4433b422c7b9e09
Parent: 5e1ee82