Skip to content
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

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

Conversation

@alexislefebvre
Copy link
Contributor

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 referenced this pull request Aug 11, 2019

@alexislefebvre alexislefebvre force-pushed the alexislefebvre:update-upgrade-guide-of-4.3-for-EventDispatcher branch from 6f8546d to 8e97ef2 Aug 11, 2019

@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

UPGRADE-4.3.md Outdated Show resolved Hide resolved

@alexislefebvre alexislefebvre force-pushed the alexislefebvre:update-upgrade-guide-of-4.3-for-EventDispatcher branch from 8e97ef2 to 880916e Aug 11, 2019

UPGRADE-4.3.md Outdated Show resolved Hide resolved

@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 Aug 11, 2019

@alexislefebvre alexislefebvre force-pushed the alexislefebvre:update-upgrade-guide-of-4.3-for-EventDispatcher branch from 880916e to 12b1219 Aug 11, 2019

@alexislefebvre

This comment has been minimized.

Copy link
Contributor Author

commented Aug 11, 2019

@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

This comment has been minimized.

Copy link
Member

commented Aug 12, 2019

@alexislefebvre works for me, please update :)

@alexislefebvre alexislefebvre force-pushed the alexislefebvre:update-upgrade-guide-of-4.3-for-EventDispatcher branch from 12b1219 to 8b9b39d Aug 12, 2019

@nicolas-grekas

This comment has been minimized.

Copy link
Member

commented Aug 13, 2019

Thank you @alexislefebvre.

@nicolas-grekas nicolas-grekas merged commit 8b9b39d into symfony:4.3 Aug 13, 2019

1 of 3 checks passed

continuous-integration/travis-ci/pr The Travis CI build failed
Details
fabbot.io Doing some proofreading and checking your coding style.
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details

nicolas-grekas added a commit that referenced this pull request Aug 13, 2019

minor #33115 [4.3] Update UPGRADE guide of 4.3 for EventDispatcher (a…
…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 alexislefebvre:update-upgrade-guide-of-4.3-for-EventDispatcher branch Aug 13, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.