-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[RFC] EventSubscriber attribute #47015
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
Comments
Well, your use case is defining an event listener, not an event subscriber (by the definitions of the component), and we already have |
@stof great, I did not find any doc that is why I've created this, https://github.com/symfony/symfony-docs/search?q=AsEventListener may I ask you a link to PR to check that? thank you :) edit: found 4f13189 will see if I can provide doc for that |
…e (94noni) This PR was submitted for the 6.0 branch but it was merged into the 5.4 branch instead. Discussion ---------- [EventDispatcher] Document the #AsEventListener attribute Document the AsEventListener attribute Ref symfony/symfony#47015 (did not found any doc thus opened an issue at first) For the code example, I've taken inspiration on the related PR: - symfony/symfony@2ab3caf#diff-57b112e725705bbbf01380b0d11c9a8fe16ea69d85d1d3e618eceeb8b58094ce - symfony/symfony@2ab3caf#diff-73a6a14d3288b358a21c0f47ecc1ec78c05e933b66e9a647e5013b2cab002b89 Commits ------- ff5032d Update event_dispatcher.rst
Description
RFC - Feature Request - EventSubscriber attribute
Opening this issue to gather feedbacks
Adding a new attribute AsEventSubscriber (mimic of AsCommand) for configuring EventSubscriber classes/methodes
Example
Before:
After:
The text was updated successfully, but these errors were encountered: