From fdb62b477391942beddf0c945ebde415acaec916 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20St=C3=BCcher?= Date: Wed, 4 Feb 2026 09:46:00 +0100 Subject: [PATCH 1/2] findAll and findBy should return list https://github.com/doctrine/orm/blob/3.6.x/src/EntityRepository.php already has this narrowed return type --- src/ObjectRepository.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ObjectRepository.php b/src/ObjectRepository.php index e3a4dc31..ce92fd64 100644 --- a/src/ObjectRepository.php +++ b/src/ObjectRepository.php @@ -27,7 +27,7 @@ public function find(mixed $id): object|null; * Finds all objects in the repository. * * @return array The objects. - * @phpstan-return T[] + * @phpstan-return */ public function findAll(): array; @@ -43,7 +43,7 @@ public function findAll(): array; * @phpstan-param array|null $orderBy * * @return array The objects. - * @phpstan-return T[] + * @phpstan-return list * * @throws UnexpectedValueException */ From 82acea63bf2bb2f4a6f18ae9f2de1719839703e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20St=C3=BCcher?= Date: Wed, 4 Feb 2026 09:48:14 +0100 Subject: [PATCH 2/2] findAll and findBy should return list https://github.com/doctrine/orm/blob/3.6.x/src/EntityRepository.php already has this narrowed return type --- src/ObjectRepository.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ObjectRepository.php b/src/ObjectRepository.php index ce92fd64..fce86e96 100644 --- a/src/ObjectRepository.php +++ b/src/ObjectRepository.php @@ -27,7 +27,7 @@ public function find(mixed $id): object|null; * Finds all objects in the repository. * * @return array The objects. - * @phpstan-return + * @phpstan-return list */ public function findAll(): array;