Closed
Description
The Console\Application::setDispatcher()
method added in PR #7466 references EventDispatcherInterface
as a type hint, however symfony/event-dispatcher
is not listed as a runtime Composer dependency.
This has caused a BC breakage when using reflection on the console Application
class, in the form of the following exception:
ReflectionException: Class Symfony\Component\EventDispatcher\EventDispatcherInterface does not exist
I'm not sure how this should be fixed, two possible solutions come to mind:
- Promote
symfony/event-dispatcher
fromrequire-dev
torequire
- Do not use a type-hint on
Application::setDispatcher()
As a workaround we've manually added symfony/event-dispatcher
to our project's composer.json, but this does not feel like a good solution as our app does not use the event features at all.