4033b602ff
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
-------
|
||
---|---|---|
.. | ||
schema | ||
annotations.xml | ||
assets.xml | ||
cache.xml | ||
collectors.xml | ||
debug_prod.xml | ||
debug.xml | ||
esi.xml | ||
form_csrf.xml | ||
form_debug.xml | ||
form.xml | ||
fragment_listener.xml | ||
fragment_renderer.xml | ||
profiling.xml | ||
property_access.xml | ||
property_info.xml | ||
request.xml | ||
router_dev.php | ||
router_prod.php | ||
router_test.php | ||
routing.xml | ||
security_csrf.xml | ||
serializer.xml | ||
services.xml | ||
session.xml | ||
ssi.xml | ||
templating_debug.xml | ||
templating_php.xml | ||
templating.xml | ||
test.xml | ||
translation_debug.xml | ||
translation.xml | ||
validator.xml | ||
web.xml | ||
workflow.xml |