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

Skip to content

[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

Merged

Conversation

derrabus
Copy link
Member

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.

@derrabus derrabus force-pushed the improvement/event-deprecation-layer branch from 5c719bb to 64ad6fe Compare May 29, 2019 21:14
@derrabus derrabus requested a review from xabbuh as a code owner May 29, 2019 21:14
@derrabus derrabus force-pushed the improvement/event-deprecation-layer branch from 64ad6fe to f7fb9d9 Compare May 29, 2019 21:18
@chalasr chalasr added this to the 5.0 milestone May 29, 2019
@derrabus derrabus force-pushed the improvement/event-deprecation-layer branch from f7fb9d9 to f0fca27 Compare May 29, 2019 21:47
@derrabus derrabus force-pushed the improvement/event-deprecation-layer branch 4 times, most recently from a405ead to d22d8de Compare May 30, 2019 09:07
@derrabus
Copy link
Member Author

Travis build should be green after #31712.

nicolas-grekas added a commit that referenced this pull request May 30, 2019
…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.
@derrabus derrabus force-pushed the improvement/event-deprecation-layer branch from d22d8de to d50da46 Compare May 30, 2019 10:06
/**
* {@inheritdoc}
*/
public function dispatch($event, string $eventName = null);
Copy link
Member

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

Copy link
Member Author

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.

Copy link
Member

@nicolas-grekas nicolas-grekas left a 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.

@derrabus
Copy link
Member Author

can we add the object return type to dispatch methods?

That would violate the contracts interface, wouldn't it?

please also update composer.json files to remove ^4.4 when appropriate, for clarity.

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.

@nicolas-grekas
Copy link
Member

PHP 7.2 return type variance allows adding the type, right?

@derrabus
Copy link
Member Author

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 $event parameter. I will add the return type.

@derrabus derrabus force-pushed the improvement/event-deprecation-layer branch from d50da46 to dd97350 Compare May 30, 2019 12:23
nicolas-grekas added a commit that referenced this pull request May 30, 2019
… (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.
@derrabus derrabus force-pushed the improvement/event-deprecation-layer branch from dd97350 to 638e2af Compare May 30, 2019 14:47
@derrabus derrabus force-pushed the improvement/event-deprecation-layer branch 2 times, most recently from a46983c to 9a185e8 Compare May 30, 2019 16:17
@derrabus derrabus force-pushed the improvement/event-deprecation-layer branch from 9a185e8 to 678e066 Compare May 30, 2019 16:59
@nicolas-grekas
Copy link
Member

Thank you @derrabus.

@nicolas-grekas nicolas-grekas merged commit 678e066 into symfony:master May 31, 2019
nicolas-grekas added a commit that referenced this pull request May 31, 2019
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.
@derrabus derrabus deleted the improvement/event-deprecation-layer branch May 31, 2019 23:27
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