From e17bcb21141e8b578b4536ea9c45179b78245424 Mon Sep 17 00:00:00 2001 From: Adrien Crivelli Date: Wed, 19 Oct 2022 15:34:31 +0200 Subject: [PATCH] Identity map cannot contain null value --- lib/Doctrine/ORM/UnitOfWork.php | 4 ++-- psalm-baseline.xml | 14 +------------- 2 files changed, 3 insertions(+), 15 deletions(-) diff --git a/lib/Doctrine/ORM/UnitOfWork.php b/lib/Doctrine/ORM/UnitOfWork.php index a859ccc46b1..f7f87ca4a97 100644 --- a/lib/Doctrine/ORM/UnitOfWork.php +++ b/lib/Doctrine/ORM/UnitOfWork.php @@ -126,7 +126,7 @@ class UnitOfWork implements PropertyChangedListener * we always take the root class name of the hierarchy. * * @var mixed[] - * @psalm-var array> + * @psalm-var array> */ private $identityMap = []; @@ -3048,7 +3048,7 @@ public function loadCollection(PersistentCollection $collection) /** * Gets the identity map of the UnitOfWork. * - * @psalm-return array> + * @psalm-return array> */ public function getIdentityMap() { diff --git a/psalm-baseline.xml b/psalm-baseline.xml index 4dcb2038a71..c185dacf910 100644 --- a/psalm-baseline.xml +++ b/psalm-baseline.xml @@ -2576,10 +2576,6 @@ - - $entity - $entity - $state === UnitOfWork::STATE_DETACHED @@ -2865,9 +2861,6 @@ $collectionToUpdate $em->getMetadataFactory() - - object - $this->entityChangeSets $this->entityChangeSets @@ -2881,16 +2874,13 @@ $entityState $entityState - - $this->identityMap[$rootClassName][$idHash] - $value $this->identityMap[$rootClassName] - + $assoc $assoc $assoc @@ -2901,8 +2891,6 @@ $collection->getOwner() $collectionToDelete->getMapping() $collectionToUpdate->getMapping() - $entity - $entity $owner