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
$qb = $this->em->createQueryBuilder()
->addSelect('tvs.title')
->addSelect('tvs.broadcastDate')
->addSelect('COUNT(tva.id) AS count')
->addSelect('SUM(CASE WHEN tva.freePeriod = TRUE THEN 1 ELSE 0 END) AS freePeriodCount')
->addSelect('SUM(CASE WHEN tva.subscriptions IS NOT NULL THEN 0 ELSE 1 END) AS userStreamingCount')
->from(TvActivity::class, 'tva')
->join('tva.tvShow', 'tvs')
->addGroupBy('tvs.id');
$dbRows = $qb->getQuery()->getResult();
\PHPStan\dumpType($dbRows);
The last two fields can be arbitrary numbers, but are reported as 0 and 1 only. If it helps I can create a full reproduction repo, but hopefully things are clear like this. It's also wrong when doing SUM(1), so the exact entity definitions might not matter.
Using phpstan-doctrine 1.3.40.
The text was updated successfully, but these errors were encountered:
I have the following code:
The dumped type is:
The last two fields can be arbitrary numbers, but are reported as 0 and 1 only. If it helps I can create a full reproduction repo, but hopefully things are clear like this. It's also wrong when doing
SUM(1)
, so the exact entity definitions might not matter.Using phpstan-doctrine 1.3.40.
The text was updated successfully, but these errors were encountered: