Skip to content

Commit 39842ad

Browse files
Merge branch '6.3' into 6.4
* 6.3: Fix merge
2 parents e2820a9 + 589eeeb commit 39842ad

File tree

4 files changed

+13
-6
lines changed

4 files changed

+13
-6
lines changed

Tests/DoctrineTestHelper.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,7 @@ public static function createTestConfiguration(): Configuration
6161
if (class_exists(DefaultSchemaManagerFactory::class)) {
6262
$config->setSchemaManagerFactory(new DefaultSchemaManagerFactory());
6363
}
64-
65-
if (method_exists(Configuration::class, 'setLazyGhostObjectEnabled')) {
64+
if (method_exists($config, 'setLazyGhostObjectEnabled')) {
6665
$config->setLazyGhostObjectEnabled(true);
6766
}
6867

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,10 +50,13 @@ 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
if (class_exists(DefaultSchemaManagerFactory::class)) {
5655
$config->setSchemaManagerFactory(new DefaultSchemaManagerFactory());
5756
}
57+
if (method_exists($config, 'setLazyGhostObjectEnabled')) {
58+
$config->setLazyGhostObjectEnabled(true);
59+
}
5860
$this->debugDataHolder = new DebugDataHolder();
5961
$config->setMiddlewares([new Middleware($this->debugDataHolder, $this->stopwatch)]);
6062

Tests/PropertyInfo/DoctrineExtractorTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ private function createExtractor(): DoctrineExtractor
4141
if (class_exists(DefaultSchemaManagerFactory::class)) {
4242
$config->setSchemaManagerFactory(new DefaultSchemaManagerFactory());
4343
}
44+
if (method_exists($config, 'setLazyGhostObjectEnabled')) {
45+
$config->setLazyGhostObjectEnabled(true);
46+
}
4447

4548
$eventManager = new EventManager();
4649
$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;
@@ -123,11 +122,15 @@ public function testVerifyOutdatedTokenAfterParallelRequestFailsAfter60Seconds()
123122
*/
124123
private function bootstrapProvider()
125124
{
126-
$config = class_exists(ORMSetup::class) ? ORMSetup::createConfiguration(true) : new Configuration();
125+
$config = ORMSetup::createConfiguration(true);
127126
if (class_exists(DefaultSchemaManagerFactory::class)) {
128127
$config->setSchemaManagerFactory(new DefaultSchemaManagerFactory());
129128
}
130129

130+
if (method_exists($config, 'setLazyGhostObjectEnabled')) {
131+
$config->setLazyGhostObjectEnabled(true);
132+
}
133+
131134
$connection = DriverManager::getConnection([
132135
'driver' => 'pdo_sqlite',
133136
'memory' => true,

0 commit comments

Comments
 (0)