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
Internal error: Failed to find parent class of constant #4288
Labels
Milestone
Comments
@vworldat PHPStan now reports different result with your code snippet: @@ @@
-1: Internal error: Failed to find parent class of constant "DEFAULT_SIZE".
Run PHPStan with --debug option and post the stack trace to:
-https://github.com/phpstan/phpstan/issues/new
+https://github.com/phpstan/phpstan/issues/new?template=Bug_report.md Full report
|
Realized this is duplicate of #4066 |
Actually isn't :) |
@vworldat After the latest commit in dev-master, PHPStan now reports different result with your code snippet: @@ @@
--1: Internal error: Failed to find parent class of constant "DEFAULT_SIZE".
-Run PHPStan with --debug option and post the stack trace to:
-https://github.com/phpstan/phpstan/issues/new
+No errors |
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. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Bug report
Phpstan fails to find class constants when used as default argument value in a trait method. I have backtracked various phpstan versions. This has not been an issue up until phpstan
0.12.25
, from0.12.26
onwards it breaks on all versions i checked including the latest0.12.58
.Code snippet that reproduces the problem
https://phpstan.org/r/c17faf82-5d21-4283-a324-b5976c6c1414
Things I have tried to make it pass:
final
or not does not matterExpected output
No errors.
The text was updated successfully, but these errors were encountered: