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
PHPStan hangs with trait that returns anonymous class that uses the trait #7214
Comments
We already had such things a couple of times in the past, but this one's kind of special. You can then chain-call |
Yeah, in theory you should be able chain any number of invocations of |
|
Fixed: phpstan/phpstan-src#1303 |
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. |
Bug report
Please review the sample code below. This appears to be specific to anonymous classes - if you switch out the anonymous class for a 'real' class that uses the trait there is no issue (e.g. https://phpstan.org/r/2fc4cc39-6ec4-4063-b904-7efaed985648).
Code snippet that reproduces the problem
I'm unable to share a 'try' link as the sample code hangs on there too, but this is a small test-case:
And you can verify that this is valid (if bad) code via this link: https://3v4l.org/VpFPP
Expected output
PHPStan should not hang.
Did PHPStan help you today? Did it make you happy in any way?
Yep, I'm very satisfied with what I've seen with PHPStan with my use-cases so far.
The code that triggered this hang in the first place was actually wrong, so in spite of the hanging it still provided me with valuable information.
The text was updated successfully, but these errors were encountered: