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

Skip to content

[4.3] Update UPGRADE guide of 4.3 for EventDispatcher #33115

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

alexislefebvre
Copy link
Contributor

@alexislefebvre alexislefebvre commented Aug 11, 2019

Q A
Branch? 4.3
Bug fix? no
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets no
License MIT
Doc PR no

I updated UPGRADE-4.3.md to ease upgrading EventDispatcher to 4.3, related changes were introduced in #28920

This code is used in Symfony:

$this->dispatcher = LegacyEventDispatcherProxy::decorate($eventDispatcher);

Thanks to @nicolas-grekas for the hint: 75369da#r34480203

@alexislefebvre alexislefebvre force-pushed the update-upgrade-guide-of-4.3-for-EventDispatcher branch from 6f8546d to 8e97ef2 Compare August 11, 2019 15:17
@alexislefebvre alexislefebvre changed the title Update UPGRADE guide of 4.3 for EventDispatcher [4.3] Update UPGRADE guide of 4.3 for EventDispatcher Aug 11, 2019
@alexislefebvre alexislefebvre force-pushed the update-upgrade-guide-of-4.3-for-EventDispatcher branch from 8e97ef2 to 880916e Compare August 11, 2019 16:15
@nicolas-grekas nicolas-grekas modified the milestones: next, 4.3 Aug 11, 2019
@nicolas-grekas nicolas-grekas changed the base branch from 4.4 to 4.3 August 11, 2019 17:00
@alexislefebvre alexislefebvre force-pushed the update-upgrade-guide-of-4.3-for-EventDispatcher branch from 880916e to 12b1219 Compare August 11, 2019 17:31
@alexislefebvre
Copy link
Contributor Author

@nicolas-grekas while we're at it, in the UPGRADE guide it is written:

The signature of the EventDispatcherInterface::dispatch() method should be updated to dispatch($event, string $eventName = null), not doing so is deprecated

Maybe I'm nitpicking but the signature of EventDispatcherInterface::dispatch() is in Symfony's code, right? I found this sentence confusing.

I suggest this change:

The signature of the EventDispatcherInterface::dispatch() method has been updated, consider using the new signature dispatch($event, string $eventName = null) instead of the old signature dispatch($eventName, $event) that is deprecated

@nicolas-grekas
Copy link
Member

@alexislefebvre works for me, please update :)

@alexislefebvre alexislefebvre force-pushed the update-upgrade-guide-of-4.3-for-EventDispatcher branch from 12b1219 to 8b9b39d Compare August 12, 2019 21:42
@nicolas-grekas
Copy link
Member

Thank you @alexislefebvre.

@nicolas-grekas nicolas-grekas merged commit 8b9b39d into symfony:4.3 Aug 13, 2019
nicolas-grekas added a commit that referenced this pull request Aug 13, 2019
…lexislefebvre)

This PR was merged into the 4.3 branch.

Discussion
----------

[4.3] Update UPGRADE guide of 4.3 for EventDispatcher

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | no
| License       | MIT
| Doc PR        | no

I updated `UPGRADE-4.3.md` to ease upgrading `EventDispatcher` to 4.3, related changes were introduced in #28920

This code is used in Symfony: https://github.com/symfony/symfony/blob/f8302262714674e3efbd775c9b107294d89fb77e/src/Symfony/Component/Security/Guard/GuardAuthenticatorHandler.php#L49

Thanks to @nicolas-grekas for the hint: 75369da#r34480203

Commits
-------

8b9b39d Update UPGRADE guide of 4.3 for EventDispatcher
@alexislefebvre alexislefebvre deleted the update-upgrade-guide-of-4.3-for-EventDispatcher branch August 13, 2019 07:50
@alexislefebvre alexislefebvre restored the update-upgrade-guide-of-4.3-for-EventDispatcher branch July 12, 2020 16:29
@alexislefebvre alexislefebvre deleted the update-upgrade-guide-of-4.3-for-EventDispatcher branch January 8, 2021 20:09
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