From 6632f382180746fa4b317b4dae30e242f2e990f9 Mon Sep 17 00:00:00 2001 From: Ondrej Mirtes Date: Mon, 19 Aug 2024 16:11:06 +0200 Subject: [PATCH] Try to reproduce internal error See https://github.com/phpstan/phpstan-doctrine/issues/602 --- tests/Rules/Doctrine/ORM/data/query-builder-dql.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/Rules/Doctrine/ORM/data/query-builder-dql.php b/tests/Rules/Doctrine/ORM/data/query-builder-dql.php index 49aa95f2..f94085a3 100644 --- a/tests/Rules/Doctrine/ORM/data/query-builder-dql.php +++ b/tests/Rules/Doctrine/ORM/data/query-builder-dql.php @@ -291,6 +291,14 @@ public function qbExprMethod(): void $queryBuilder->getQuery(); } + public function bug602(array $objectConditions): void + { + $queryBuilder = $this->entityManager->createQueryBuilder(); + $queryBuilder->select('e') + ->from(MyEntity::class, 'e') + ->andWhere($queryBuilder->expr()->orX(...$objectConditions)); + } + } class CustomExpr extends \Doctrine\ORM\Query\Expr