Skip to content

Commit f9d9ab4

Browse files
committed
bug #7502 Fix test bootstrap crash on PHP < 8.4 due to enable_native_lazy_objects (Honza Novak)
This PR was merged into the 5.x branch. Discussion ---------- Fix test bootstrap crash on PHP < 8.4 due to enable_native_lazy_objects ## Summary - Adds a `\PHP_VERSION_ID >= 80400` check before enabling `enable_native_lazy_objects` in test app Doctrine configurations - Fixes test suite bootstrap crash when running on PHP 8.2/8.3 via DDEV Fixes #7501 Commits ------- b4f59d0 Fix test bootstrap crash on PHP < 8.4 by adding PHP version check for native lazy objects
2 parents 0486264 + b4f59d0 commit f9d9ab4

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)