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

[Reflection] Update return types in some reflection methods #2694

Closed
wants to merge 2 commits into from

Conversation

phansys
Copy link
Contributor

@phansys phansys commented Oct 24, 2023

Please, confirm I should I also update the existing stubs.
IIUC, stubs from PHPStorm already declare the proper return types through attributes depending on the PHP version, but I guess they are not being parsed here.

See https://phpstan.org/r/85179264-493f-4b65-a8ff-4af5b45b31c1.

@phpstan-bot
Copy link
Collaborator

You've opened the pull request against the latest branch 1.11.x. If your code is relevant on 1.10.x and you want it to be released sooner, please rebase your pull request and change its target to 1.10.x.

@phansys phansys force-pushed the reflection_named_type branch 2 times, most recently from dcb6ed7 to 297936d Compare October 24, 2023 15:45
@staabm
Copy link
Contributor

staabm commented Oct 24, 2023

I noticed you also opened a PR at php-src.

just a note: the reported problem might get fixed, when php8-stubs include the upstream php-src change. we will see.

@ondrejmirtes
Copy link
Member

I disagree with these changes. These methods simply return ReflectionType. If you make your code work with that then you're better prepared for newer PHP versions.

@phansys phansys deleted the reflection_named_type branch October 29, 2023 07:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants