[Messenger] Allow interfaces to be type-hinted as well#28271
Merged
fabpot merged 1 commit intosymfony:masterfrom Aug 29, 2018
Merged
Conversation
a2f6bd9 to
9349f3f
Compare
sroze
added a commit
to sroze/messenger-workshop
that referenced
this pull request
Aug 26, 2018
… (possible thanks to symfony/symfony#28271)
| } | ||
|
|
||
| foreach (class_implements($class, false) as $interface) { | ||
| if ($handler = $this->resolveFromClass($interface)) { |
Member
There was a problem hiding this comment.
not sure this needs to be recursive: class_implements already returns all implemented interfaces
also, what about parents?
Contributor
Author
There was a problem hiding this comment.
No point of having it recursive, that's true; removed it and added handling of its parents (and the relevant tests, obsly 💃)
9349f3f to
2dbbfbd
Compare
chalasr
approved these changes
Aug 28, 2018
fabpot
approved these changes
Aug 29, 2018
Member
|
Thank you @sroze. |
fabpot
added a commit
that referenced
this pull request
Aug 29, 2018
… (sroze) This PR was merged into the 4.2-dev branch. Discussion ---------- [Messenger] Allow interfaces to be type-hinted as well | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #27076 | License | MIT | Doc PR | ø Interfaces can be type-hinted as well for the message handlers. Commits ------- 2dbbfbd Allow interfaces to be type-hinted as well
Member
|
This BR is breaking the C.I. for the 4.1 branch, see e.g. https://travis-ci.org/symfony/symfony/jobs/421969557 |
nicolas-grekas
added a commit
that referenced
this pull request
Sep 1, 2018
…compiler pass in FWB (sroze) This PR was merged into the 4.1 branch. Discussion ---------- [Messenger][FrameworkBundle] Move commands-specifics to a compiler pass in FWB | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #28271 (comment) | License | MIT | Doc PR | ø We very recently [broke the tests](#28271 (comment)) by adding a legitimate BC-break in one of Messenger's command. The failure is on FrameworkBundle (on the 4.1 branch) when using the "latest" dependencies (so messenger on master): the XML configuration does not match anymore the class. Even though it makes sense to have most the compiler pass in the components, it does not make much sense to have things into them that are very coupled to what we defined in FWB' XML. This pull-request moves what is related to this command to the FWB directly. Commits ------- b5415ea Move commands-specifics to a compiler pass in FWB
Member
|
I've created symfony/symfony-docs#10279 to document this new feature. Please, don't forget to create a doc issue for every new feature. Otherwise it's very complicated for the Docs team to keep track of all needed changes. Thanks! |
fabpot
added a commit
that referenced
this pull request
Sep 8, 2018
… not using a Container (fabpot) This PR was merged into the 4.2-dev branch. Discussion ---------- [Messenger] Add interfaces to be type-hinted even when not using a Container | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | yes | BC breaks? | no <!-- see https://symfony.com/bc --> | Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files --> | Tests pass? | yes <!-- please add some, will be required by reviewers --> | Fixed tickets | n/a | License | MIT | Doc PR | n/a This a follow-up to #28271. This adds #28271 to the non-container handler locator. Commits ------- 963fde9 [Messenger] added interfaces to be type-hinted even when not using a Container
sroze
added a commit
to sroze/messenger-workshop
that referenced
this pull request
Sep 21, 2018
… (possible thanks to symfony/symfony#28271)
This was referenced Nov 3, 2018
Closed
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Interfaces can be type-hinted as well for the message handlers.