Skip to content

Commit

Permalink
Merge pull request #11369 from doctrine/3.1.x
Browse files Browse the repository at this point in the history
Merge 3.1.x up into 3.2.x
  • Loading branch information
greg0ire authored Mar 17, 2024
2 parents cb05f1a + c5315f8 commit f9331ee
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/UnitOfWork.php
Original file line number Diff line number Diff line change
Expand Up @@ -2662,13 +2662,13 @@ private function eagerLoadCollections(array $collections, ToManyInverseSideMappi
foreach ($found as $targetValue) {
$sourceEntity = $targetProperty->getValue($targetValue);

if ($sourceEntity === null && isset($targetClass->associationMappings[$mappedBy]['joinColumns'])) {
if ($sourceEntity === null && isset($targetClass->associationMappings[$mappedBy]->joinColumns)) {
// case where the hydration $targetValue itself has not yet fully completed, for example
// in case a bi-directional association is being hydrated and deferring eager loading is
// not possible due to subclassing.
$data = $this->getOriginalEntityData($targetValue);
$id = [];
foreach ($targetClass->associationMappings[$mappedBy]['joinColumns'] as $joinColumn) {
foreach ($targetClass->associationMappings[$mappedBy]->joinColumns as $joinColumn) {
$id[] = $data[$joinColumn['name']];

Check failure on line 2672 in src/UnitOfWork.php

View workflow job for this annotation

GitHub Actions / Static Analysis with Psalm (3.8.2)

UndefinedMethod

src/UnitOfWork.php:2672:39: UndefinedMethod: Method Doctrine\ORM\Mapping\JoinColumnMapping::offsetGet does not exist (see https://psalm.dev/022)

Check failure on line 2672 in src/UnitOfWork.php

View workflow job for this annotation

GitHub Actions / Static Analysis with PHPStan (3.8.2, phpstan-dbal3.neon)

Cannot access offset 'name' on Doctrine\ORM\Mapping\JoinColumnMapping.

Check failure on line 2672 in src/UnitOfWork.php

View workflow job for this annotation

GitHub Actions / Static Analysis with PHPStan (default, phpstan.neon)

Cannot access offset 'name' on Doctrine\ORM\Mapping\JoinColumnMapping.
}
} else {
Expand Down

0 comments on commit f9331ee

Please sign in to comment.