diff --git a/core/includes/bootstrap.inc b/core/includes/bootstrap.inc
index c78540a486..68dd7747e3 100644
--- a/core/includes/bootstrap.inc
+++ b/core/includes/bootstrap.inc
@@ -30,7 +30,7 @@
* Sites installing Drupal on PHP versions lower than this will see a warning
* message, but Drupal can still be installed.
*/
-const DRUPAL_RECOMMENDED_PHP = '7.1.3';
+const DRUPAL_RECOMMENDED_PHP = '7.1.7';
/**
* Minimum recommended value of PHP memory_limit.
diff --git a/core/modules/system/system.install b/core/modules/system/system.install
index bde16bd347..7b8dc6202d 100644
--- a/core/modules/system/system.install
+++ b/core/modules/system/system.install
@@ -157,19 +157,30 @@ function system_requirements($phase) {
}
}
+ 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')) {
+ $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;
+ }
+
// Test PHP version and show link to phpinfo() if it's available
$phpversion = $phpversion_label = phpversion();
if (function_exists('phpinfo')) {
if ($phase === 'runtime') {
$phpversion_label = t('@phpversion (more information)', ['@phpversion' => $phpversion, ':url' => (new Url('system.php'))->toString()]);
}
- $requirements['php'] = [
+ $requirements['phpinfo'] = [
'title' => t('PHP'),
'value' => $phpversion_label,
];
}
else {
- $requirements['php'] = [
+ $requirements['phpinfo'] = [
'title' => t('PHP'),
'value' => $phpversion_label,
'description' => t('The phpinfo() function has been disabled for security reasons. To see your server\'s phpinfo() information, change your PHP settings or contact your server administrator. For more information, Enabling and disabling phpinfo() handbook page.', [':phpinfo' => 'https://www.drupal.org/node/243993']),
@@ -177,17 +188,6 @@ function system_requirements($phase) {
];
}
- 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')) {
- $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 the PHP 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;
- }
-
// Suggest to update to at least 5.5.21 or 5.6.5 for disabling multiple
// statements.
if (($phase === 'install' || \Drupal::database()->driver() === 'mysql') && !SystemRequirements::phpVersionWithPdoDisallowMultipleStatements($phpversion)) {