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
I noticed that TypeResolver currently doesn't support the list type which is generally used as subtype of array<int, Foo>, indicating it's an array that PHP's array_is_list() function would return true.
I think our generics support can be improved. I'm not sure yet how to do this, but we are definitely open for pr's to help us move forward. When I quickly scan the way psalm treads the list type I think this could be a Pseudo type like we have for strings. Maybe we should remove the check in
I noticed that TypeResolver currently doesn't support the list type which is generally used as subtype of
array<int, Foo>
, indicating it's an array that PHP'sarray_is_list()
function would return true.It's described in more detail in Psalm's documentation for instance: https://psalm.dev/docs/annotating_code/type_syntax/array_types/#lists
From browsing the code it seems this would need to be handled in
TypeResolver::resolveCollection()
.What do you think about supporting this in this library?
The text was updated successfully, but these errors were encountered: