Skip to content

Commit b4f59d0

Browse files
author
Honza Novak
committed
Fix test bootstrap crash on PHP < 8.4 by adding PHP version check for native lazy objects
Fixes #7501
1 parent 640e870 commit b4f59d0

4 files changed

Lines changed: 4 additions & 4 deletions

File tree

tests/Functional/Apps/AdminRouteApp/config/packages/doctrine.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
];
3131

3232
$doctrineOrmVersion = Composer\InstalledVersions::getVersion('doctrine/orm');
33-
if (null !== $doctrineOrmVersion && version_compare($doctrineOrmVersion, '3.4.0', '>=')) {
33+
if (null !== $doctrineOrmVersion && version_compare($doctrineOrmVersion, '3.4.0', '>=') && \PHP_VERSION_ID >= 80400) {
3434
$config['orm']['enable_native_lazy_objects'] = true;
3535
}
3636
}

tests/Functional/Apps/CustomizationApp/config/packages/doctrine.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
];
3131

3232
$doctrineOrmVersion = Composer\InstalledVersions::getVersion('doctrine/orm');
33-
if (null !== $doctrineOrmVersion && version_compare($doctrineOrmVersion, '3.4.0', '>=')) {
33+
if (null !== $doctrineOrmVersion && version_compare($doctrineOrmVersion, '3.4.0', '>=') && \PHP_VERSION_ID >= 80400) {
3434
$config['orm']['enable_native_lazy_objects'] = true;
3535
}
3636
}

tests/Functional/Apps/DefaultApp/config/packages/doctrine.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
];
3131

3232
$doctrineOrmVersion = Composer\InstalledVersions::getVersion('doctrine/orm');
33-
if (null !== $doctrineOrmVersion && version_compare($doctrineOrmVersion, '3.4.0', '>=')) {
33+
if (null !== $doctrineOrmVersion && version_compare($doctrineOrmVersion, '3.4.0', '>=') && \PHP_VERSION_ID >= 80400) {
3434
$config['orm']['enable_native_lazy_objects'] = true;
3535
}
3636
}

tests/Functional/Apps/SecuredApp/config/packages/doctrine.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
];
3131

3232
$doctrineOrmVersion = Composer\InstalledVersions::getVersion('doctrine/orm');
33-
if (null !== $doctrineOrmVersion && version_compare($doctrineOrmVersion, '3.4.0', '>=')) {
33+
if (null !== $doctrineOrmVersion && version_compare($doctrineOrmVersion, '3.4.0', '>=') && \PHP_VERSION_ID >= 80400) {
3434
$config['orm']['enable_native_lazy_objects'] = true;
3535
}
3636
}

0 commit comments

Comments
 (0)