demo
demo copied to clipboard
Paginator.php
// $useOutputWalkers = \count($this->queryBuilder->getDQLPart('having') ?: []) > 0;
$useOutputWalkers = $this->queryBuilder->getDQLPart('having') != null;
Please, share some details about why this is better. Does it fix a bug? Is it more performant? Thanks.
this fix a bug, this result -> $this->queryBuilder->getDQLPart('having') is not an array, is a doctrine expression.
also I think this -> $paginator = new DoctrinePaginator($query, true); always true is not ok, I modified like this
$fetchJoinCollection = true;
if (0 === \count($this->queryBuilder->getDQLPart('join'))) {
$query->setHint(CountWalker::HINT_DISTINCT, false);
$fetchJoinCollection = false;
}
$paginator = new DoctrinePaginator($query, $fetchJoinCollection);
// $useOutputWalkers = \count($this->queryBuilder->getDQLPart('having') ?: []) > 0;
$useOutputWalkers = $this->queryBuilder->getDQLPart('having') != null;
$paginator->setUseOutputWalkers($useOutputWalkers);
Current pagination seems to be working fine and we haven't received any issue reporting problems with it. So, let's close this issue for now and if there are ny issues in the future, we'll receive feedback from people and we'll fix it. Thanks!