Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions tests/Type/Doctrine/data/QueryResult/queryBuilderGetQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,23 @@ public function testDynamicMethodCall(
assertType('mixed', $result);
}

public function testDynamicMethodCallInGroupBy(
EntityManagerInterface $em,
Andx $and,
Criteria $criteria,
string $string
): void
{
$result = $em->createQueryBuilder()
->select('AVG(m.intColumn) AS average')
->from(Many::class, 'm')
->addGroupBy($string)
->getQuery()
->getResult();

assertType('list<array{average: float}>', $result); // not nullable, we have GROUP BY present
}
ú
private function createVehicule(): VehicleInterface
{
return new Truck();
Expand Down
Loading