Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[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

Closed
wants to merge 6 commits into from

Conversation

noniagriconomie
Copy link
Contributor

@noniagriconomie noniagriconomie commented Nov 24, 2020

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

@carsonbot carsonbot added this to the 4.4 milestone Nov 24, 2020
@carsonbot carsonbot changed the title [eventDispatcher] Document second dispatch code logic [EventDispatcher] [eventDispatcher] Document second dispatch code logic Nov 24, 2020
@noniagriconomie noniagriconomie changed the title [EventDispatcher] [eventDispatcher] Document second dispatch code logic [EventDispatcher] Document second dispatch code logic Nov 24, 2020
@noniagriconomie
Copy link
Contributor Author

@OskarStark friendly ping, can this PR be merged?

Copy link
Contributor

@OskarStark OskarStark left a 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!

@noniagriconomie noniagriconomie changed the title [EventDispatcher] Document second dispatch code logic [WIP] [EventDispatcher] Document second dispatch code logic Mar 12, 2021
@noniagriconomie noniagriconomie changed the title [WIP] [EventDispatcher] Document second dispatch code logic [EventDispatcher] Document second dispatch code logic Mar 12, 2021
@noniagriconomie noniagriconomie force-pushed the patch-11 branch 2 times, most recently from 90d6742 to 035cab4 Compare March 12, 2021 09:05
@noniagriconomie
Copy link
Contributor Author

@OskarStark is this PR ready for you? thanks

Comment on lines +401 to +404
// 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',
Copy link
Contributor

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

cc @javiereguiluz

Copy link
Contributor Author

@noniagriconomie noniagriconomie Apr 22, 2021

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?

Copy link
Contributor Author

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 :)

@noniagriconomie noniagriconomie changed the title [EventDispatcher] Document second dispatch code logic [EventDispatcher] Document dispatch() with one argument as a FQCN Aug 12, 2021
@noniagriconomie
Copy link
Contributor Author

👋 friendly ping @OskarStark should I rewrork/rephrase the sentence? if yes, please can you give me the desired one?
I have no idea how to document both ways, old and new one on same code bloc, thank you

@noniagriconomie
Copy link
Contributor Author

closed, will reopen if interested :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants