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
When i have Doctrine Query with HYDRATE_SINGLE_SCALAR, and this contain only 1 column (ex. count), code have return an Type error because \Steevanb\DoctrineStats\Doctrine\ORM\Event\OverloadedHydratorTrait::hydrateAll need to return an array.
We can see \Doctrine\ORM\Internal\Hydration\AbstractHydrator::hydrateAll doesn't have a PHP return type.
So i think we should juste remove PHP return type on \Steevanb\DoctrineStats\Doctrine\ORM\Event\OverloadedHydratorTrait::hydrateAll.
Hello,
First, thank for your job.
Second, i want to repport a problem :) .
When i have Doctrine Query with HYDRATE_SINGLE_SCALAR, and this contain only 1 column (ex. count), code have return an Type error because \Steevanb\DoctrineStats\Doctrine\ORM\Event\OverloadedHydratorTrait::hydrateAll need to return an array.
We can see \Doctrine\ORM\Internal\Hydration\AbstractHydrator::hydrateAll doesn't have a PHP return type.
So i think we should juste remove PHP return type on \Steevanb\DoctrineStats\Doctrine\ORM\Event\OverloadedHydratorTrait::hydrateAll.
Exemple of query :
$repository->createQueryBuilder('t') ->select('count(t.id)') ->getQuery() ->getSingleScalarResult();
And error returned :
TypeError: Return value of Doctrine\ORM\Internal\Hydration\SingleScalarHydrator::hydrateAll() must be of the type array, string returned
I didn't see CODE OF CONDUCT, or Test on your projet, can you tell me how can help you to fix this ?
Regards.
The text was updated successfully, but these errors were encountered: