diff --git a/core/modules/simpletest/src/InstallerTestBase.php b/core/modules/simpletest/src/InstallerTestBase.php index 593f257a4d..96d98e05aa 100644 --- a/core/modules/simpletest/src/InstallerTestBase.php +++ b/core/modules/simpletest/src/InstallerTestBase.php @@ -261,6 +261,8 @@ protected function continueOnExpectedWarnings($expected_warnings = []) { // - etc. // We add one more selector than expected warnings to confirm that there // isn't any other warning before clicking the link. + // @todo Make this more reliable in + // https://www.drupal.org/project/drupal/issues/2927345. $selectors = []; for ($i = 0; $i <= count($expected_warnings); $i++) { $selectors[] = 'h3#warning' . implode('', array_fill(0, $i + 1, '+details')) . ' summary'; diff --git a/core/modules/system/system.install b/core/modules/system/system.install index c2390e0445..1f1227be66 100644 --- a/core/modules/system/system.install +++ b/core/modules/system/system.install @@ -160,8 +160,8 @@ function system_requirements($phase) { // Verify the user is running a supported PHP version. // If the site is running a recommended version of PHP, just display it // as an informational message on the status report. This will be overridden - // with an error or warning if the site is running a PHP version that is no - // longer supported by Drupal, or that will drop support in the near future. + // with an error or warning if the site is running older PHP versions for + // which Drupal has already or will soon drop support. $phpversion = $phpversion_label = phpversion(); if (function_exists('phpinfo')) { // If the site is running a recommended PHP version and has the phpinfo() @@ -185,13 +185,17 @@ function system_requirements($phase) { 'severity' => REQUIREMENT_INFO, ]; } + if (version_compare($phpversion, DRUPAL_MINIMUM_PHP) < 0) { $requirements['php']['description'] = t('Your PHP installation is too old. Drupal requires at least PHP %version.', ['%version' => DRUPAL_MINIMUM_PHP]); $requirements['php']['severity'] = REQUIREMENT_ERROR; // If PHP is old, it's not safe to continue with the requirements check. return $requirements; } - elseif ((version_compare($phpversion, DRUPAL_RECOMMENDED_PHP) < 0) && ($phase === 'install' || $phase === 'runtime')) { + // @todo Warn about specific end dates for our PHP 5.5, 5.6, and 7.0 support + // once each is set. + // @see https://www.drupal.org/project/drupal/issues/2927344 + if ((version_compare($phpversion, DRUPAL_RECOMMENDED_PHP) < 0) && ($phase === 'install' || $phase === 'runtime')) { $requirements['php']['description'] = t('Your PHP installation is running version %version. It is recommended to upgrade to version %recommended or higher to ensure your site remains secure and continues to receive updates. See PHP\'s version support documentation and the PHP requirements handbook page for more information.', ['%version' => $phpversion, '%recommended' => DRUPAL_RECOMMENDED_PHP, ':php_requirements' => 'https://www.drupal.org/docs/8/system-requirements/php']); $requirements['php']['severity'] = REQUIREMENT_WARNING; }