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 think it is great that PHPStan requires specification of the value type within iterable types. This feature has prevented a lot of bugs and made our codebase much more understandable. It would be great if it could be taken even further: specifying the value type should also be required for nested iterables.
For the following example, PHPStan should complain that the value type for the nested iterable is missing:
This should extend all the way down if more levels of nesting are used. While it is increasingly more work to write out nested types, I found that those complex parts of our code are also the most error prone.
Did PHPStan help you today? Did it make you happy in any way?
Just yesterday, I was able to find 2 bugs in our codebase by adding a bunch of array shapes 🎉
The text was updated successfully, but these errors were encountered:
If you're getting value out of PHPStan, please consider supporting the development, either by becoming a GitHub sponsor (my personal account, organization account), or by subscribing to PHPStan Pro with your team :) Thanks for considering!
Feature request
I think it is great that PHPStan requires specification of the value type within iterable types. This feature has prevented a lot of bugs and made our codebase much more understandable. It would be great if it could be taken even further: specifying the value type should also be required for nested iterables.
For the following example, PHPStan should complain that the value type for the nested
iterable
is missing:This should extend all the way down if more levels of nesting are used. While it is increasingly more work to write out nested types, I found that those complex parts of our code are also the most error prone.
Did PHPStan help you today? Did it make you happy in any way?
Just yesterday, I was able to find 2 bugs in our codebase by adding a bunch of array shapes 🎉
The text was updated successfully, but these errors were encountered: