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

Return of parent::__set_state() method is only object #8573

Closed
blankse opened this issue Dec 21, 2022 · 3 comments · Fixed by phpstan/phpstan-src#2138
Closed

Return of parent::__set_state() method is only object #8573

blankse opened this issue Dec 21, 2022 · 3 comments · Fixed by phpstan/phpstan-src#2138
Labels
Milestone

Comments

@blankse
Copy link

blankse commented Dec 21, 2022

Bug report

Code snippet that reproduces the problem

https://phpstan.org/r/0e60e9cb-5dd0-4a64-8ab6-3ef4764ae44b

Expected output

The parent should return the right type static and not just object.

@ondrejmirtes
Copy link
Member

https://github.com/phpstan/phpstan-src/blob/7c68a1212f29c1508dd5e4b6cb2f7045f3b1d89c/src/Reflection/Php/PhpMethodReflection.php#L313-L346 needs fixing and read $this->nativeReturnType too.

@blankse
Copy link
Author

blankse commented Dec 21, 2022

@ondrejmirtes I created a PR: phpstan/phpstan-src#2138

@github-actions
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants