Skip to content

Commit 420c38b

Browse files
authored
Merge 1.x into 2.x
2 parents 38f8c5c + 3514eca commit 420c38b

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

psalm.xml

+1
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,6 @@
1515
<!-- Psalm equivalent of PHPStan config `treatPhpDocTypesAsCertain: false` -->
1616
<DocblockTypeContradiction errorLevel="suppress"/>
1717
<RedundantConditionGivenDocblockType errorLevel="suppress"/>
18+
<MissingClassConstType errorLevel="suppress"/>
1819
</issueHandlers>
1920
</psalm>

src/Collection/AuditedCollection.php

-4
Original file line numberDiff line numberDiff line change
@@ -297,8 +297,6 @@ public function exists(\Closure $p)
297297
*
298298
* @phpstan-param \Closure(T, TKey):bool $p
299299
* @phpstan-return Collection<TKey, T>
300-
*
301-
* @psalm-suppress MoreSpecificImplementedParamType https://github.com/doctrine/collections/pull/411
302300
*/
303301
#[\ReturnTypeWillChange]
304302
public function filter(\Closure $p)
@@ -341,8 +339,6 @@ public function map(\Closure $func)
341339
*
342340
* @phpstan-param \Closure(TKey, T):bool $p
343341
* @phpstan-return array{0: Collection<TKey, T>, 1: Collection<TKey, T>}
344-
*
345-
* @psalm-suppress MoreSpecificImplementedParamType https://github.com/doctrine/collections/pull/411
346342
*/
347343
#[\ReturnTypeWillChange]
348344
public function partition(\Closure $p)

src/EventListener/LogRevisionsListener.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,7 @@ private function saveRevisionEntityData(EntityManagerInterface $em, ClassMetadat
547547
$data = $entityData[$field] ?? null;
548548
$relatedId = [];
549549

550-
if (null !== $data && $uow->isInIdentityMap($data)) {
550+
if (\is_object($data) && $uow->isInIdentityMap($data)) {
551551
$relatedId = $uow->getEntityIdentifier($data);
552552
}
553553

@@ -741,7 +741,7 @@ private function prepareUpdateData(EntityManagerInterface $em, EntityPersister $
741741

742742
$newValId = null;
743743

744-
if (null !== $newVal) {
744+
if (\is_object($newVal)) {
745745
if (!$uow->isInIdentityMap($newVal)) {
746746
continue;
747747
}

0 commit comments

Comments
 (0)