Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature #20260 [DependencyInjection] Support autowiring for EventDisp…
…atcher/EventDispatcherInterface (chalasr) This PR was merged into the 3.3-dev branch. Discussion ---------- [DependencyInjection] Support autowiring for EventDispatcher/EventDispatcherInterface | Q | A | | --- | --- | | Branch? | master | | Bug fix? | no | | New feature? | yes | | BC breaks? | no | | Deprecations? | no | | Tests pass? | yes | | Fixed tickets | n/a | | License | MIT | | Doc PR | n/a | As it is a very common dependency. Currently it gives: > [Symfony\Component\DependencyInjection\Exception\RuntimeException] > Unable to autowire argument of type "Symfony\Component\EventDispatcher\EventDispatcherInterface" for the service "dummy". Multiple services exist for this interface (debug.event_dispatcher, debug.event_dispatcher.parent). After this, the `TraceableEventDispatcher` will be injected in dev and the `ContainerAwareEventDispatcher` in prod, as when injecting `@event_dispatcher` explicitly. ping @weaverryan IMHO this could be treated as a an enhancement for the autowiring feature and be part of 3.2. Commits ------- 5fd4733 Support autowiring for EventDispatcher/EventDispatcherInterface
- Loading branch information
Showing
5 changed files
with
30 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters