Skip to content

Commit 6deec36

Browse files
authored
Merge pull request #12046 from greg0ire/3.5.x
Merge 3.4.x up into 3.5.x
2 parents 8005333 + 7f40422 commit 6deec36

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Configuration.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -667,15 +667,15 @@ public function isNativeLazyObjectsEnabled(): bool
667667

668668
public function enableNativeLazyObjects(bool $nativeLazyObjects): void
669669
{
670-
if (! $nativeLazyObjects) {
670+
if (PHP_VERSION_ID >= 80400 && ! $nativeLazyObjects) {
671671
Deprecation::trigger(
672672
'doctrine/orm',
673673
'https://github.com/doctrine/orm/pull/12005',
674674
'Disabling native lazy objects is deprecated and will be impossible in Doctrine ORM 4.0.',
675675
);
676676
}
677677

678-
if (PHP_VERSION_ID < 80400) {
678+
if (PHP_VERSION_ID < 80400 && $nativeLazyObjects) {
679679
throw new LogicException('Lazy loading proxies require PHP 8.4 or higher.');
680680
}
681681

0 commit comments

Comments
 (0)