From 686437720665576a1ac91a3ce13976a2a907ef46 Mon Sep 17 00:00:00 2001 From: Adrien Crivelli Date: Wed, 19 Oct 2022 15:34:31 +0200 Subject: [PATCH] Identity map cannot contains null value --- lib/Doctrine/ORM/UnitOfWork.php | 4 ++-- psalm-baseline.xml | 36 ++++----------------------------- 2 files changed, 6 insertions(+), 34 deletions(-) diff --git a/lib/Doctrine/ORM/UnitOfWork.php b/lib/Doctrine/ORM/UnitOfWork.php index a3f1794899b..11754f47e43 100644 --- a/lib/Doctrine/ORM/UnitOfWork.php +++ b/lib/Doctrine/ORM/UnitOfWork.php @@ -120,7 +120,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 = []; @@ -3017,7 +3017,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 32c84df56a9..39627778da5 100644 --- a/psalm-baseline.xml +++ b/psalm-baseline.xml @@ -1,5 +1,5 @@ - + IterableResult @@ -266,19 +266,14 @@ wrapInTransaction - - $className - find flush - - $className + $connection - $entityName getMetadataCacheImpl @@ -590,12 +585,6 @@ $definition $this->subClasses - - $this->reflClass - - - getReflectionClass - $cache $className @@ -986,10 +975,6 @@ - - $className - $entityName - $className $className @@ -2498,8 +2483,7 @@ - - $this->repositoryList[$repositoryHash] + $this->repositoryList[$repositoryHash] = $this->createRepository($entityManager, $entityName) @@ -2692,10 +2676,6 @@ - - $entity - $entity - $state === UnitOfWork::STATE_DETACHED @@ -2998,9 +2978,6 @@ $em->getMetadataFactory() - - object - $this->entityChangeSets $this->entityChangeSets @@ -3010,13 +2987,10 @@ $prevManagedCopy $previousManagedCopy - - $this->identityMap[$rootClassName][$idHash] - $this->identityMap[$rootClassName] - + $assoc $assoc $assoc @@ -3026,8 +3000,6 @@ $collection->getOwner() $collection->getOwner() $collectionToDelete->getMapping() - $entity - $entity $owner