diff --git a/src/Symfony/Bridge/Doctrine/Tests/Security/RememberMe/DoctrineTokenProviderTest.php b/src/Symfony/Bridge/Doctrine/Tests/Security/RememberMe/DoctrineTokenProviderTest.php index 6ea5cf555ba9d..2971f4d662089 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Security/RememberMe/DoctrineTokenProviderTest.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Security/RememberMe/DoctrineTokenProviderTest.php @@ -122,9 +122,7 @@ protected function bootstrapProvider(): DoctrineTokenProvider $config = ORMSetup::createConfiguration(true); $config->setSchemaManagerFactory(new DefaultSchemaManagerFactory()); - if (!class_exists(\Doctrine\Persistence\Mapping\Driver\AnnotationDriver::class)) { // doctrine/persistence >= 3.0 - $config->setLazyGhostObjectEnabled(true); - } + $config->setLazyGhostObjectEnabled(true); $connection = DriverManager::getConnection([ 'driver' => 'pdo_sqlite',