Skip to content

Commit e3a4db7

Browse files
committed
(test) Enable native lazy objects on PHP 8.4 in base test cases
1 parent 266820d commit e3a4db7

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

tests/Integration/MartinGeorgiev/TestCase.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,10 @@ protected function setUp(): void
7777
$configuration->setProxyDir(self::FIXTURES_DIRECTORY.'/Proxies');
7878
$configuration->setProxyNamespace(self::FIXTURE_NAMESPACE.'\Proxy');
7979
$configuration->setAutoGenerateProxyClasses(true);
80+
if (\PHP_VERSION_ID >= 80400 && \method_exists($configuration, 'enableNativeLazyObjects')) {
81+
// @phpstan-ignore-next-line
82+
$configuration->enableNativeLazyObjects(true);
83+
}
8084
$this->setConfigurationCache($configuration);
8185

8286
// Register the entity namespace for DQL short aliases

tests/Unit/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/TestCase.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ protected function setUp(): void
2828
$configuration->setProxyDir(static::FIXTURES_DIRECTORY.'/Proxies');
2929
$configuration->setProxyNamespace('Fixtures\MartinGeorgiev\Doctrine\Entity\Proxy');
3030
$configuration->setAutoGenerateProxyClasses(true);
31+
if (\PHP_VERSION_ID >= 80400 && \method_exists($configuration, 'enableNativeLazyObjects')) {
32+
// @phpstan-ignore-next-line
33+
$configuration->enableNativeLazyObjects(true);
34+
}
3135
$this->setConfigurationCache($configuration);
3236

3337
$this->configuration = $configuration;

0 commit comments

Comments
 (0)