-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
[EventDispatcher] Document dispatch() with one argument as a FQCN #14606
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
Conversation
@OskarStark friendly ping, can this PR be merged? |
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.
Please add missing versionadded
directive.
It would also be helpful to reference the PR which introduced this feature in symfony/symfony
, Thanks!
1fe776a
to
ee5c7ef
Compare
ee5c7ef
to
62b8848
Compare
90d6742
to
035cab4
Compare
035cab4
to
882bca2
Compare
@OskarStark is this PR ready for you? thanks |
// when using two arguments, the event and the event name | ||
OrderPlacedEvent::NAME => 'onStoreOrder', | ||
// when using only one argument, the event (since Symfony 4.3+) | ||
OrderPlacedEvent::class => 'onStoreOrder', |
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.
This sounds a bit confusing to me
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.
@OskarStark I agree, but I do not know how I can document both in the same code snippet, or should I duplicate this code block? each one having one of the possible code behaviour?
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.
friendly ping @OskarStark @javiereguiluz do you have an idea on the way to document both in this code example?
thanks :)
Co-authored-by: Oskar Stark <[email protected]>
Co-authored-by: Oskar Stark <[email protected]>
👋 friendly ping @OskarStark should I rewrork/rephrase the sentence? if yes, please can you give me the desired one? |
closed, will reopen if interested :) |
Related to https://symfony.com/blog/new-in-symfony-4-3-simpler-event-dispatching
Feature introduced in symfony/symfony#28920
Maybe it is useful/helpful to document this here as well as the blog post