-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[EventDispatcher] Remove deprecation layer #31709
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
[EventDispatcher] Remove deprecation layer #31709
Conversation
5c719bb
to
64ad6fe
Compare
64ad6fe
to
f7fb9d9
Compare
f7fb9d9
to
f0fca27
Compare
a405ead
to
d22d8de
Compare
Travis build should be green after #31712. |
…atcher 5 (derrabus) This PR was merged into the 4.4 branch. Discussion ---------- Marked several components as incompatible with EventDispatcher 5 | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | N/A | License | MIT | Doc PR | N/A Quite a few components still use the old event class that is to be removed in Symfony 5. This PR ensures that they are only installed with EventDispatcher 4. Follow up to #31709 Commits ------- e6a4526 Marked several components as incompatible with EventDispatcher 5.
d22d8de
to
d50da46
Compare
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function dispatch($event, string $eventName = null); |
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.
already in the parent interface, thus not needed
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.
Yes, but in the parent interface, the second argument is commented out. As far as I understand this note, event dispatcher implementations in 5.0 must have this signature, so I'm making sure that they do.
src/Symfony/Component/EventDispatcher/LegacyEventDispatcherProxy.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/EventDispatcher/Tests/ImmutableEventDispatcherTest.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/HttpKernel/Tests/Debug/TraceableEventDispatcherTest.php
Outdated
Show resolved
Hide resolved
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.
can we add the object
return type to dispatch methods?
please also update composer.json files to remove ^4.4
when appropriate, for clarity.
That would violate the contracts interface, wouldn't it?
The changes that I've made to the other components should not affect the compatibility with EventDispatcher 4.4, as far as I can tell. |
PHP 7.2 return type variance allows adding the type, right? |
Oh right, the return type. Yes, of course. I misread your comment and thought you meant the type-hint for the |
d50da46
to
dd97350
Compare
… (derrabus) This PR was merged into the 4.4 branch. Discussion ---------- [HttpKernel] Don't install HttpKernel 4.4 with Console 5 | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | N/A | License | MIT | Doc PR | N/A Another attempt to get the build of #31709 green. Because the base class of `ConsoleEvent` was changed, the Console component 5.0 in going to be incompatible with `DebugHandlersListener` in HttpKernel 4.4. Commits ------- 44f326d HttpKernel 4.4 is incompatible with Console 5 because of the EventDispatcher changes.
dd97350
to
638e2af
Compare
a46983c
to
9a185e8
Compare
9a185e8
to
678e066
Compare
Thank you @derrabus. |
This PR was merged into the 5.0-dev branch. Discussion ---------- [EventDispatcher] Remove deprecation layer | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | no | BC breaks? | yes | Deprecations? | no | Tests pass? | yes | Fixed tickets | N/A | License | MIT | Doc PR | N/A This PR removes all deprecations from the event dispatcher component. Commits ------- 678e066 [EventDispatcher] Remove deprecation layer.
This PR removes all deprecations from the event dispatcher component.