Fix GH-8932: Provide a way to get the called-scope of closures#9299
Merged
arnaud-lb merged 1 commit intophp:PHP-8.0from Sep 2, 2022
Merged
Fix GH-8932: Provide a way to get the called-scope of closures#9299arnaud-lb merged 1 commit intophp:PHP-8.0from
arnaud-lb merged 1 commit intophp:PHP-8.0from
Conversation
bwoebi
approved these changes
Aug 11, 2022
Member
There was a problem hiding this comment.
Looks good to me. (And I think introducing it in the next bugfix release is the right thing to do.)
I'd like to have another person check whether we want to do this. @arnaud-lb maybe?
Member
|
Are we fine with adding a public method to an abstract class in a revision release? |
Member
|
Given that this method is implemented on the abstract class directly and not abstract, I don't see much risk here. |
kocsismate
reviewed
Sep 2, 2022
| public function getClosureScopeClass() {} | ||
|
|
||
| /** @return ReflectionClass|null */ | ||
| public function getClosureCalledClass() {} |
Member
There was a problem hiding this comment.
The return type could have been declared directly, since it's a brand new function (so there is no BC impact). :) Then there would be no need for the @tentative-return-type annotation in PHP-8.1.
nicolas-grekas
added a commit
to symfony/symfony
that referenced
this pull request
Dec 13, 2022
…rekas) This PR was merged into the 5.4 branch. Discussion ---------- Fix getting the name of closures on PHP 8.1.11+ | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | - | License | MIT | Doc PR | - Leverages php/php-src#9299 Commits ------- bccd23d Fix getting the name of closures on PHP 8.1.11+
symfony-splitter
pushed a commit
to symfony/error-handler
that referenced
this pull request
Dec 13, 2022
…rekas) This PR was merged into the 5.4 branch. Discussion ---------- Fix getting the name of closures on PHP 8.1.11+ | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | - | License | MIT | Doc PR | - Leverages php/php-src#9299 Commits ------- bccd23d4df Fix getting the name of closures on PHP 8.1.11+
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.
As discussed in #8935
Named after https://php.net/get-called-class