Skip to content

Commit 70780f3

Browse files
[DoctrineBridge] Silence ORM deprecation
1 parent e404e40 commit 70780f3

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Test/DoctrineTestHelper.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
use Doctrine\Persistence\Mapping\Driver\MappingDriverChain;
2525
use Doctrine\Persistence\Mapping\Driver\SymfonyFileLocator;
2626
use PHPUnit\Framework\TestCase;
27+
use Symfony\Component\VarExporter\LazyGhostTrait;
2728

2829
/**
2930
* Provides utility functions needed in tests.
@@ -90,6 +91,10 @@ public static function createTestConfiguration()
9091
$config->setSchemaManagerFactory(new DefaultSchemaManagerFactory());
9192
}
9293

94+
if (\PHP_VERSION_ID >= 80100 && method_exists(Configuration::class, 'setLazyGhostObjectEnabled') && trait_exists(LazyGhostTrait::class)) {
95+
$config->setLazyGhostObjectEnabled(true);
96+
}
97+
9398
return $config;
9499
}
95100

0 commit comments

Comments
 (0)