-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow subscribing events by class #295
Conversation
f35f4a1
to
e2ca33b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for this Tomas.
I'm 100% aware that event names is not "the way to go" since few Symfony version.
But I've been struggling with BC to be able to remove it from the source code.
Now that you added the ability to register listener for both event name and event class, how can we inform developer that rely on event name that they must update their code for next major ?
I think we could just add @deprecated on constants then? For example https://github.com/symfony/symfony/blob/5.4/src/Symfony/Component/HttpKernel/HttpKernelInterface.php |
8832066
to
c3b83bf
Compare
c3b83bf
to
3c55940
Compare
3c55940
to
c1b0863
Compare
Thank you very much Tomas :) |
Subscribing by event names was and old way before subscribing by event class name was not supported, so this enables it.