You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Do you think we can disable the new optimization for huge const arrays?
Don't know if it can be considered a bug but my const is now oversimplified and the array shape is not guessed as precisely as it used to be with PHPStan <1.9.5.
@@ @@-309: Method Config::huge() should return string but returns array<int, string>|string.+309: Method Config::huge() should return string but returns list<string>|string.
Full report
Line
Error
309
`Method Config::huge() should return string but returns list
Activity
VincentLanglet commentedon Jan 8, 2023
What could be interesting maybe is to provide configuration for constants like
phpstan-bot commentedon Oct 6, 2024
@ddebin After the latest push in 2.0.x, PHPStan now reports different result with your code snippet:
Full report
Add regression test for #8636
Add regression test for #8636
phpstan-bot commentedon Apr 27, 2026
Closed via merging phpstan/phpstan-src#5555
Updated PHPStan to commit 4279f35588c8fd6f8f94fc4331b3e7b8e17b8740
Updated PHPStan to commit a883ebf93306119140ef476757baacbbedf97b88
github-actions commentedon May 29, 2026
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.