How to work with nonEmpty arrays since v0.12.53 #4273
-
Since v0.12.53 phpstan somehow detects the array is nonempty.
I've been declaring array shapes before this version like Now it requires me to do |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Please post a phpstan.org reproduction so I can know what’s going on. |
Beta Was this translation helpful? Give feedback.
-
I decided this is simply a bug and that array shape should not be generalized when being traversed because of generics: phpstan/phpstan-src@94e3443 |
Beta Was this translation helpful? Give feedback.
I decided this is simply a bug and that array shape should not be generalized when being traversed because of generics: phpstan/phpstan-src@94e3443