Skip to content
This repository has been archived by the owner on Dec 3, 2023. It is now read-only.

use ReflectionProvider in ParentClassMethodNodeResolver #4166

Merged
merged 4 commits into from
Jun 11, 2022

Conversation

staabm
Copy link
Contributor

@staabm staabm commented Jun 11, 2022

closes #4163

@staabm staabm marked this pull request as ready for review June 11, 2022 07:46
@TomasVotruba TomasVotruba merged commit 915ca55 into deprecated-packages:main Jun 11, 2022
@TomasVotruba
Copy link
Member

Thank you 👍

@staabm
Copy link
Contributor Author

staabm commented Jun 11, 2022

Testing the fix would requires a autoloader setup etc. Not sure its worth the effort..?

@TomasVotruba
Copy link
Member

I'm not sure what you mean exactly.

@staabm staabm deleted the patch-2 branch June 11, 2022 08:29
@staabm
Copy link
Contributor Author

staabm commented Jun 11, 2022

Didn't realize you already merged the PR. Was asking myself whether the fix could be easily unit tested.. but I don't think so

@TomasVotruba
Copy link
Member

Test is always nice :) but this is used in a rule that has few tests. So I think we're good.
I vaguelly recall the reason for native reflection because of parsing internal classes and method body was missing. But since then PHPStan reflection got improved.

We'll see how it perform in the wild with next release 👍

staabm referenced this pull request in phpstan/phpstan-src Jun 15, 2022
@staabm
Copy link
Contributor Author

staabm commented Jun 17, 2022

Fyi, next phpstan release will contain bleeding edge rules which warn for this kind of runtime reflection problems

@TomasVotruba
Copy link
Member

Good to know, thanks 👍

Btw, how's the the Symplify 11 working?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

phpstan-rules: Class "X" does not exist
2 participants