File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
lib/Adapter/Doctrine/ORM/Tests Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -19,10 +19,16 @@ protected function setUp(): void
1919 $ config ->setMetadataCache (new ArrayAdapter ());
2020 $ config ->setQueryCache (new ArrayAdapter ());
2121 $ config ->setResultCache (new ArrayAdapter ());
22- $ config ->setProxyDir (__DIR__ .'/_files ' );
23- $ config ->setProxyNamespace (__NAMESPACE__ .'\Proxies ' );
2422 $ config ->setMetadataDriverImpl (new AttributeDriver ([__DIR__ .'/Entity ' ]));
2523
24+ /** @phpstan-ignore-next-line function.alreadyNarrowedType */
25+ if (\PHP_VERSION_ID >= 80400 && method_exists ($ config , 'enableNativeLazyObjects ' )) {
26+ $ config ->enableNativeLazyObjects (true );
27+ } else {
28+ $ config ->setProxyDir (__DIR__ .'/_files ' );
29+ $ config ->setProxyNamespace (__NAMESPACE__ .'\Proxies ' );
30+ }
31+
2632 $ conn = [
2733 'driver ' => 'pdo_sqlite ' ,
2834 'memory ' => true ,
You can’t perform that action at this time.
0 commit comments