Skip to content

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.

@phansys phansys force-pushed the reflection_named_type branch from 297936d to 2b2af4e Compare October 24, 2023 16:07
@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

Development

Successfully merging this pull request may close these issues.

4 participants