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
{{ message }}
Repository navigation
Issue shows up in level 3 but disappears in level 8 #12984
Not sure whether this is a bug. As the title says:
An issue about broken covariance is reported starting from level 3 onward, but magically disappears in level 8.
Happens in PHPStan version 2 latest release, version 1 latest release is not affected.
Interestingly the claimed type inconsistency doesn't exist, expected and actual type are identical:
Method DocoptResultTest::getIterator() should return
ArrayIterator<string, array<string>|bool|int|null> but returns
ArrayIterator<string, array<string>|bool|int|null>
Template type TValue on class ArrayIterator is not covariant. Learn more: https://phpstan.org/blog/whats-up-with-template-covariant
Activity
VincentLanglet commentedon Aug 3, 2025
I think it's the same issue than #9096 (comment) (and 4 other issues).
phpstan-bot commentedon Sep 10, 2026
Closed via merging phpstan/phpstan-src#6392
github-actions commentedon Oct 12, 2026
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.