The latest release of doctrine/collection breaks the build #6805

Closed
opened 2026-01-22 15:38:59 +01:00 by admin · 1 comment
Owner

Originally created by @greg0ire on GitHub (Aug 11, 2021).

Originally assigned to: @greg0ire on GitHub.

Bug Report

Static analysis jobs are failing, and it seems related to doctrine/collection. Since there was a release recently, that's probably the cause.

Downgrading to 1.6.7 confirms that.

 ------ ------------------------------------------------------------------------------------------------------------------------------------------
  Line   lib/Doctrine/ORM/LazyCriteriaCollection.php
 ------ ------------------------------------------------------------------------------------------------------------------------------------------
         Ignored error pattern #^Call to an undefined method Doctrine\\Common\\Collections\\Collection<mixed, mixed\>\:\:matching\(\)\.$# in path
         /home/greg/dev/doctrine-orm/lib/Doctrine/ORM/LazyCriteriaCollection.php was not matched in reported errors.
  108    Call to an undefined method Doctrine\Common\Collections\Collection<(int|string), mixed>::matching().
 ------ ------------------------------------------------------------------------------------------------------------------------------------------

 ------ ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  Line   lib/Doctrine/ORM/PersistentCollection.php
 ------ ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
         Ignored error pattern #^Call to an undefined method Doctrine\\Common\\Collections\\Collection<mixed, mixed\>\:\:matching\(\)\.$# in path
         /home/greg/dev/doctrine-orm/lib/Doctrine/ORM/PersistentCollection.php was not matched in reported errors.
  116    Type mixed in generic type Doctrine\Common\Collections\Collection<mixed, mixed> in PHPDoc tag @param for parameter $collection is not subtype of template type TKey of (int|string) of class
         Doctrine\Common\Collections\Collection.
  512    Variable $offset in isset() always exists and is not nullable.
  645    Type mixed in generic type Doctrine\Common\Collections\Collection<mixed, mixed> in PHPDoc tag @return is not subtype of template type TKey of (int|string) of class
         Doctrine\Common\Collections\Collection.
  652    Call to an undefined method Doctrine\Common\Collections\Collection<(int|string), mixed>::matching().
  682    Type mixed in generic type Doctrine\Common\Collections\Collection<mixed, mixed> in PHPDoc tag @return is not subtype of template type TKey of (int|string) of class
         Doctrine\Common\Collections\Collection.
 ------ ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Originally created by @greg0ire on GitHub (Aug 11, 2021). Originally assigned to: @greg0ire on GitHub. ### Bug Report Static analysis jobs are failing, and it seems related to `doctrine/collection`. Since there was a release recently, that's probably the cause. Downgrading to 1.6.7 confirms that. ``` ------ ------------------------------------------------------------------------------------------------------------------------------------------ Line lib/Doctrine/ORM/LazyCriteriaCollection.php ------ ------------------------------------------------------------------------------------------------------------------------------------------ Ignored error pattern #^Call to an undefined method Doctrine\\Common\\Collections\\Collection<mixed, mixed\>\:\:matching\(\)\.$# in path /home/greg/dev/doctrine-orm/lib/Doctrine/ORM/LazyCriteriaCollection.php was not matched in reported errors. 108 Call to an undefined method Doctrine\Common\Collections\Collection<(int|string), mixed>::matching(). ------ ------------------------------------------------------------------------------------------------------------------------------------------ ------ ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Line lib/Doctrine/ORM/PersistentCollection.php ------ ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Ignored error pattern #^Call to an undefined method Doctrine\\Common\\Collections\\Collection<mixed, mixed\>\:\:matching\(\)\.$# in path /home/greg/dev/doctrine-orm/lib/Doctrine/ORM/PersistentCollection.php was not matched in reported errors. 116 Type mixed in generic type Doctrine\Common\Collections\Collection<mixed, mixed> in PHPDoc tag @param for parameter $collection is not subtype of template type TKey of (int|string) of class Doctrine\Common\Collections\Collection. 512 Variable $offset in isset() always exists and is not nullable. 645 Type mixed in generic type Doctrine\Common\Collections\Collection<mixed, mixed> in PHPDoc tag @return is not subtype of template type TKey of (int|string) of class Doctrine\Common\Collections\Collection. 652 Call to an undefined method Doctrine\Common\Collections\Collection<(int|string), mixed>::matching(). 682 Type mixed in generic type Doctrine\Common\Collections\Collection<mixed, mixed> in PHPDoc tag @return is not subtype of template type TKey of (int|string) of class Doctrine\Common\Collections\Collection. ------ ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ```
admin closed this issue 2026-01-22 15:38:59 +01:00
Author
Owner

@greg0ire commented on GitHub (Aug 11, 2021):

Variable $offset in isset() always exists and is not nullable. will be fixed by https://github.com/doctrine/collections/pull/282

@greg0ire commented on GitHub (Aug 11, 2021): `Variable $offset in isset() always exists and is not nullable.` will be fixed by https://github.com/doctrine/collections/pull/282
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#6805