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
Having many class constants triggers error #5447
Comments
Thank you for your kind words! This is basically the same problem as #3555, please follow that one. |
I managed to solve this.
Look forward to the next release (0.12.95) :) |
Thanks for resolving this quickly. It was a pretty annoying problem with a codebase that uses heavily constant enums. |
No problem! Feel free to show your support by sponsoring my account or PHPStan organization :) I'd really appreciate it! |
Ref phpstan/phpstan#4793 Ref phpstan/phpstan#5062 Ref phpstan/phpstan#5447 Ref phpstan/phpstan#5454 Ref phpstan/phpstan#3366 Ref phpstan/phpstan#5072 Ref phpstan/phpstan#3530 Ref phpstan/phpstan#5530 Ref phpstan/phpstan#1861 Ref phpstan/phpstan#4843 Ref phpstan/phpstan#4602 Ref phpstan/phpstan#4499 Ref phpstan/phpstan#2142
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
Came across this odd behavior after updating to 0.12.94.
Having many class constants leads to
Array (array<string, string>) does not accept key string.
in array population. Removing any one of the referenced constants in class fixes this, so it's somehow triggered by the amount and not actual content.Code snippet that reproduces the problem
https://phpstan.org/r/a05d7319-0244-4476-9c00-2401475bb4a4
Expected output
No errors despite amount of constants.
Did PHPStan help you today? Did it make you happy in any way?
PHPStan has been a great help and have loved to see it become more stable in a past year or so.
The text was updated successfully, but these errors were encountered: