Skip to content

Commit 03149fe

Browse files
committed
Throw at compile time if trying to enable native lazy objects on an unsupported PHP version
1 parent b3a1a33 commit 03149fe

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/DependencyInjection/DoctrineExtension.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -588,6 +588,10 @@ protected function ormLoad(array $config, ContainerBuilder $container)
588588
);
589589
}
590590

591+
if (PHP_VERSION_ID < 80400) {
592+
throw new LogicException('Using native lazy objects require PHP 8.4 or higher.');
593+
}
594+
591595
$container->removeDefinition('doctrine.orm.proxy_cache_warmer');
592596
} elseif (! class_exists(AnnotationDriver::class)) {
593597
// Only emit the deprecation notice for ORM 3 users

0 commit comments

Comments
 (0)