Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace more occurrences of array access #11214

Merged
merged 1 commit into from
Feb 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/UnitOfWork.php
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
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