Skip to content
Snippets Groups Projects
Verified Commit 6dfc9250 authored by Alex Pott's avatar Alex Pott
Browse files

Issue #3400302 by poker10, longwave, nterbogt: PHP OPcache bug detection issue

parent 549b1e36
No related branches found
No related tags found
No related merge requests found
......@@ -340,7 +340,7 @@ function system_requirements($phase) {
// errors, so warn about that when running Drupal on those versions.
// @todo Remove this when \Drupal::MINIMUM_PHP is at least 8.1.6 in
// https://www.drupal.org/i/3305726.
if (version_compare(\Drupal::MINIMUM_PHP, '8.1.6') < 0) {
if (version_compare($phpversion, '8.1.6') < 0) {
$requirements['php']['description'] = t('PHP %version has <a href=":bug_url">an OPcache bug that can cause fatal errors with class autoloading</a>. This can be fixed by upgrading to PHP 8.1.6 or later. See <a href="http://php.net/supported-versions.php">PHP\'s version support documentation</a> and the <a href=":php_requirements">Drupal PHP requirements</a> page for more information.', [
'%version' => $phpversion,
':bug_url' => 'https://github.com/php/php-src/issues/8164',
......
......@@ -76,7 +76,7 @@ public function testStatusPage() {
// bug in OPcache.
// @todo Remove this when \Drupal::MINIMUM_PHP is at least 8.1.6 in
// https://www.drupal.org/i/3305726.
if (version_compare(\Drupal::MINIMUM_PHP, '8.1.6') < 0) {
if (version_compare($phpversion, '8.1.6') < 0) {
$this->assertSession()->pageTextContains("PHP $phpversion has an OPcache bug that can cause fatal errors with class autoloading. This can be fixed by upgrading to PHP 8.1.6 or later.");
$this->assertSession()->linkExists('an OPcache bug that can cause fatal errors with class autoloading');
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment