-
-
Notifications
You must be signed in to change notification settings - Fork 914
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A SplFixedArray is not interpreted as iterable. #11269
Comments
That's because Fixed example: https://phpstan.org/r/13d3ae1e-6356-4c15-b948-d04ffa08bfbf |
Here's when it changed: phpstan/phpstan-src#587 |
Thanks a lot ! |
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. |
Bug report
Hello !
I use a SplFixedArray which contains a value of type
T
. I pass this SplFixedArray as a parameter to a function that expects aiterable<T>
, and phpstan returns an error.Code snippet that reproduces the problem
https://phpstan.org/r/5c3cd16c-89d1-4734-b329-0fcce1f48b79
Expected output
SplFixedArray<T>
implementsIteratorAggregate<T>
which extendsTraversable<T>
which is then a,iterable<T>
. So logically it should work.... Unless I'm wrong somewhere 😄Did PHPStan help you today? Did it make you happy in any way?
Thank you for this great product. You make all our work much more qualitative and our applications more stable... Thank you thank you thank you thank you...
The text was updated successfully, but these errors were encountered: