EventListener classes should be renamed to EventSubscriber
zenstok opened this issue · comments
Symfony FOSUserBundle versions: all
Description of the problem including expected versus actual behavior:
The EventListener directory and all EventListener classes are misleading names, because in the Symfony paradigm every class from the EventListener directory is actually an Event Subscriber, not an Event Listener. You can see that every class inside the bundle implements EventSubscriberInterface and in Symfony there are 2 methods to approach events:
Event Listeners: https://symfony.com/doc/3.4/event_dispatcher.html#creating-an-event-listener
and Event Subscribers: https://symfony.com/doc/3.4/event_dispatcher.html#creating-an-event-subscriber
So based on the documentation what is created is actually an Event Subscriber.
Steps to reproduce:
- Rename classes and directory to EventSubscriber instead of EventListener
This won't be renamed. We follow the naming used in the Symfony best practices here.