Skip to content

Commit f4443b6

Browse files
Merge branch '6.4' into 7.0
* 6.4: Fix merge
2 parents c93b036 + 39842ad commit f4443b6

File tree

4 files changed

+13
-5
lines changed

4 files changed

+13
-5
lines changed

Tests/DoctrineTestHelper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public static function createTestConfiguration(): Configuration
6060
$config->setMetadataDriverImpl(new AttributeDriver([__DIR__.'/../Tests/Fixtures' => 'Symfony\Bridge\Doctrine\Tests\Fixtures'], true));
6161
$config->setSchemaManagerFactory(new DefaultSchemaManagerFactory());
6262

63-
if (method_exists(Configuration::class, 'setLazyGhostObjectEnabled')) {
63+
if (method_exists($config, 'setLazyGhostObjectEnabled')) {
6464
$config->setLazyGhostObjectEnabled(true);
6565
}
6666

Tests/Middleware/Debug/MiddlewareTest.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
namespace Symfony\Bridge\Doctrine\Tests\Middleware\Debug;
1313

14-
use Doctrine\DBAL\Configuration;
1514
use Doctrine\DBAL\Connection;
1615
use Doctrine\DBAL\Driver\Middleware as MiddlewareInterface;
1716
use Doctrine\DBAL\DriverManager;
@@ -51,8 +50,11 @@ private function init(bool $withStopwatch = true): void
5150
{
5251
$this->stopwatch = $withStopwatch ? new Stopwatch() : null;
5352

54-
$config = class_exists(ORMSetup::class) ? ORMSetup::createConfiguration(true) : new Configuration();
53+
$config = ORMSetup::createConfiguration(true);
5554
$config->setSchemaManagerFactory(new DefaultSchemaManagerFactory());
55+
if (method_exists($config, 'setLazyGhostObjectEnabled')) {
56+
$config->setLazyGhostObjectEnabled(true);
57+
}
5658
$this->debugDataHolder = new DebugDataHolder();
5759
$config->setMiddlewares([new Middleware($this->debugDataHolder, $this->stopwatch)]);
5860

Tests/PropertyInfo/DoctrineExtractorTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ private function createExtractor(): DoctrineExtractor
3939
$config = ORMSetup::createConfiguration(true);
4040
$config->setMetadataDriverImpl(new AttributeDriver([__DIR__.'/../Tests/Fixtures' => 'Symfony\Bridge\Doctrine\Tests\Fixtures'], true));
4141
$config->setSchemaManagerFactory(new DefaultSchemaManagerFactory());
42+
if (method_exists($config, 'setLazyGhostObjectEnabled')) {
43+
$config->setLazyGhostObjectEnabled(true);
44+
}
4245

4346
$eventManager = new EventManager();
4447
$entityManager = new EntityManager(DriverManager::getConnection(['driver' => 'pdo_sqlite'], $config, $eventManager), $config, $eventManager);

Tests/Security/RememberMe/DoctrineTokenProviderTest.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
namespace Security\RememberMe;
1313

14-
use Doctrine\DBAL\Configuration;
1514
use Doctrine\DBAL\DriverManager;
1615
use Doctrine\DBAL\Schema\DefaultSchemaManagerFactory;
1716
use Doctrine\ORM\ORMSetup;
@@ -120,9 +119,13 @@ public function testVerifyOutdatedTokenAfterParallelRequestFailsAfter60Seconds()
120119

121120
private function bootstrapProvider(): DoctrineTokenProvider
122121
{
123-
$config = class_exists(ORMSetup::class) ? ORMSetup::createConfiguration(true) : new Configuration();
122+
$config = ORMSetup::createConfiguration(true);
124123
$config->setSchemaManagerFactory(new DefaultSchemaManagerFactory());
125124

125+
if (method_exists($config, 'setLazyGhostObjectEnabled')) {
126+
$config->setLazyGhostObjectEnabled(true);
127+
}
128+
126129
$connection = DriverManager::getConnection([
127130
'driver' => 'pdo_sqlite',
128131
'memory' => true,

0 commit comments

Comments
 (0)