-
-
Notifications
You must be signed in to change notification settings - Fork 930
Closed
phpstan/phpstan-src
#1860Labels
Description
Feature request
If I declare a list with @psalm-
prefix like the following annotation, I would think, phpstan wont let us write random array keys without giving an error:
/**
* @var array<int, string>
* @psalm-var list<string>
*/
Code snippet that reproduces the problem
https://phpstan.org/r/e0cb84f3-4949-4b2b-822a-bd3f0e6e517a
https://phpstan.org/r/310c5806-540e-4202-a3b3-785e42daa0f6
Expected output
Something like "Foo::$bar was expected to be a list of strings, non-list given" or something like this. 🤷