Skip to content

Commit 3c95957

Browse files
authored
Merge pull request #609 from greg0ire/adapt-to-new-settings
Adapt to new setting position
2 parents d797eca + c380309 commit 3c95957

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

tests/DependencyInjection/DoctrineMigrationsExtensionTest.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,10 @@ public function testPrefersEntityManagerOverConnection(): void
299299
$ormConfig['controller_resolver'] = ['auto_mapping' => false];
300300
}
301301

302+
if (PHP_VERSION_ID >= 80400) {
303+
$ormConfig['enable_native_lazy_objects'] = true;
304+
}
305+
302306
$container = $this->getContainer($config, null, $ormConfig);
303307

304308
$container->compile();
@@ -368,9 +372,7 @@ public function testCustomEntityManager(): void
368372
}
369373

370374
if (PHP_VERSION_ID >= 80400) {
371-
foreach ($ormConfig['entity_managers'] as $name => $emConfig) {
372-
$ormConfig['entity_managers'][$name]['enable_native_lazy_objects'] = true;
373-
}
375+
$ormConfig['enable_native_lazy_objects'] = true;
374376
} elseif (interface_exists(LazyGhostTrait::class)) {
375377
// For PHP 8.0 and 8.1 we need to check for the interface as the trait is only used when the interface exists
376378
$ormConfig['enable_lazy_ghost_objects'] = true;

0 commit comments

Comments
 (0)