phpstan-doctrine: False positive when working with ArrayAccess
This code fails with the error ... expects ArrayAccess<int, covariant object>, Doctrine\Common\Collections\ArrayCollection<int, stdClass> given.
About this issue
- Original URL
- State: closed
- Created 3 months ago
- Comments: 20 (10 by maintainers)
Commits related to this issue
- Collection stub - we do not need `|null` in ArrayAccess TKey Closes #557 — committed to phpstan/phpstan-doctrine by ondrejmirtes 3 months ago
I’ve removed the
|nullpart, we’ll see what happens: https://github.com/phpstan/phpstan-doctrine/commit/1667bda042320163fe503dd15e9fee3d37cb31cf