-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
[EventDispatcher] Listeners per events which implement some interface #52145
Comments
Supporting that would probably have a non-negligeable performance impact (for all users of the components, not just when this feature is used) because this requires changing the loading of listeners to not be a |
@stof of course, the performance of such a dispatcher will be worse, but the organization of the code and its support for some tasks will be greatly improved. I think it makes sense to make a separate class of the dispatcher, which the user will connect independently if necessary. |
Dear Concern, If the feature will be accepted by the maintainers, I would like to try to implement the feature. Regards, |
+1 |
Given that the proposed event dispatcher would have a worse performance compared to the optimized one we already have I would be rather reluctant to add this one to the core. IMO such a class would fit nicely in a third-party package that could make the upsides and downsides of the class compared to Symfony's one quite clear. |
Thank you for this suggestion. |
Description
I need event subscriber which listen any event which implements some interface.
Example
The
LoggableEventSubscriber::onLoggableEvent()
will be called perEventFoo
andEventBar
The text was updated successfully, but these errors were encountered: