debesha / DoctrineProfileExtraBundle

Bundle to get information about doctrine hydration performance
MIT License
123 stars 16 forks source link

Countable|array must be compatible AbstractHydrator::hydrateAll #31

Closed janklan closed 6 days ago

janklan commented 1 week ago

After updating to the latest release, I'm getting this error when running migrations:

In LoggingHydratorTrait.php line 32:

  Compile Error: Declaration of Debesha\DoctrineProfileExtraBundle\ORM\LoggingHydratorTrait::hydrateAll(Doctrine\DBAL\Result $stmt, Doctrine\ORM\Query\ResultSetMapping $resultSetMapping, array $hints = []): Countable|array must be compatible   
  with Doctrine\ORM\Internal\Hydration\AbstractHydrator::hydrateAll($stmt, $resultSetMapping, array $hints = [])                                                                                                                                    

installed versions:

debesha/doctrine-hydration-profiler-bundle 1.4  
doctrine/annotations                       2.0.1 
doctrine/cache                             2.2.0 
doctrine/collections                       2.2.2 
doctrine/common                            3.4.4 
doctrine/data-fixtures                     1.7.0 
doctrine/dbal                              3.8.6 
doctrine/deprecations                      1.1.3 
doctrine/doctrine-bundle                   2.12.0
doctrine/doctrine-fixtures-bundle          3.6.1 
doctrine/doctrine-migrations-bundle        3.3.1 
doctrine/event-manager                     2.0.1 
doctrine/inflector                         2.0.10
doctrine/instantiator                      2.0.0 
doctrine/lexer                             3.0.1 
doctrine/migrations                        3.7.4 
doctrine/orm                               2.19.5
doctrine/persistence                       3.3.3 
doctrine/sql-formatter                     1.4.0 
janklan commented 6 days ago

The signature should be the one of https://github.com/doctrine/orm/blob/2.19.x/src/Internal/Hydration/AbstractHydrator.php#L240, and the one of https://github.com/doctrine/orm/blob/3.2.x/src/Internal/Hydration/AbstractHydrator.php#L158C70-L158C107 when support for ORM 2.x is dropped.