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
Using anonymous class breaks discovering symbols (Fatal error) #3663
Comments
This bug report is missing a link to reproduction on phpstan.org. |
Created repository with minimal code to reproduce. https://github.com/davidbrnovjak/phpstan_issue_3663
Last version without this issue is 0.12.25 and can be reproduced using version 0.12.26 onwards. |
Seems to work as expected: https://phpstan.org/r/eb5ce9c0-a6e3-4057-8bd9-f41591e4677a Can you reproduce the issue on phpstan.org? |
I confirm this is a real bug, It cannot be reproduced on phpstan.org because the bug is in OptimizedDirectorySourceLocator which the playground doesn't use. |
Turns out the problem wasn't in OptimizedDirectorySourceLocator at all. The problem was that we couldn't safely use |
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
Using anonymous class definition inside another class leads to Fatal error during symbol discovery
Removing the anonymous class definition resolves the error.
Code snippet that reproduces the problem
Unable to reproduce in playground.
Class snippet
PHPStan debug trace
The text was updated successfully, but these errors were encountered: