Open
Description
I found a severe pitfall in this example code:
symfony-docs/event_dispatcher.rst
Lines 198 to 208 in b9f8400
There seems to be an implicit assumption here that class CustomEvent
has been defined and exists in the same namespace.
If CustomEvent
is defined in the App\Event
namespace used by other examples in this file then the AsEventListener
attribute fails silently and the listener method will never do anything.
Specifically, there is a missing use
statement here and it's not easy to debug.
Metadata
Metadata
Assignees
Labels
No labels