From 3c2fc4639ea6c087d2a08a81533a4b63c7838cb3 Mon Sep 17 00:00:00 2001 From: Karsten Dambekalns Date: Mon, 23 Sep 2019 14:11:56 +0200 Subject: [PATCH] BUGFIX: Remove Connection::PARAM_STR_ARRAY hint This "fixes" https://github.com/doctrine/orm/issues/7827, by actually passing the correct type as parameter. And the "type hint" can be removed, as well. --- Classes/Domain/Repository/NodeDataRepository.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Classes/Domain/Repository/NodeDataRepository.php b/Classes/Domain/Repository/NodeDataRepository.php index b142e9b42..1bdcba9d2 100644 --- a/Classes/Domain/Repository/NodeDataRepository.php +++ b/Classes/Domain/Repository/NodeDataRepository.php @@ -11,7 +11,6 @@ * source code. */ -use Doctrine\DBAL\Connection; use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\Internal\Hydration\IterableResult; use Doctrine\ORM\Query; @@ -1530,13 +1529,17 @@ public function isInRemovedNodes(NodeData $nodeData) */ protected function createQueryBuilder(array $workspaces) { + $workspacesNames = array_map(static function (Workspace $workspace) { + return $workspace->getName(); + }, $workspaces); + /** @var QueryBuilder $queryBuilder */ $queryBuilder = $this->entityManager->createQueryBuilder(); $queryBuilder->select('n') ->from(NodeData::class, 'n') ->where('n.workspace IN (:workspaces)') - ->setParameter('workspaces', $workspaces, Connection::PARAM_STR_ARRAY); + ->setParameter('workspaces', $workspaceNames); return $queryBuilder; }