Skip to content

Commit

Permalink
Merge pull request #11214 from greg0ire/followup-array-access
Browse files Browse the repository at this point in the history
Replace more occurrences of array access
  • Loading branch information
greg0ire authored Feb 3, 2024
2 parents 3764ebf + a2faeb9 commit 3db79eb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/UnitOfWork.php
Original file line number Diff line number Diff line change
Expand Up @@ -2713,7 +2713,7 @@ public function loadCollection(PersistentCollection $collection): void
private function scheduleCollectionForBatchLoading(PersistentCollection $collection, ClassMetadata $sourceClass): void
{
$mapping = $collection->getMapping();
$name = $mapping['sourceEntity'] . '#' . $mapping['fieldName'];
$name = $mapping->sourceEntity . '#' . $mapping->fieldName;

if (! isset($this->eagerLoadingCollections[$name])) {
$this->eagerLoadingCollections[$name] = [
Expand Down
3 changes: 1 addition & 2 deletions tests/Tests/ORM/Mapping/ClassMetadataTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -870,8 +870,7 @@ public function testAssociationOverrideKeepsDeclaringClass(): void

$mapping = $cm->getAssociationMapping('parentDirectory');

self::assertArrayHasKey('declared', $mapping);
self::assertSame(Directory::class, $mapping['declared']);
self::assertSame(Directory::class, $mapping->declared);
}

#[TestGroup('DDC-1955')]
Expand Down

0 comments on commit 3db79eb

Please sign in to comment.