Issue #2267551 follow-up by jfhovinne: [meta] Deal with PHP requirement vs. Debian PHP version numbering.

8.0.x
webchick 2014-10-20 11:44:35 -07:00
parent f04c96070b
commit 89c6ae701d
2 changed files with 4 additions and 7 deletions

View File

@ -22,15 +22,12 @@ use Drupal\Core\Language\LanguageInterface;
/**
* Minimum supported version of PHP.
*/
const DRUPAL_MINIMUM_PHP = '5.4.5';
/**
* Minimum supported version of PHP on Debian.
*
* Minimum version is 5.4.5, or 5.4.4-14+deb7u14 on Debian Wheezy.
*
* @see https://www.drupal.org/node/2267551.
*/
const DRUPAL_MINIMUM_PHP_DEBIAN = '5.4.4-14+deb7u14';
define('DRUPAL_MINIMUM_PHP', PHP_VERSION == '5.4.4-14+deb7u14' ? '5.4.4' : '5.4.5');
/**
* Minimum recommended value of PHP memory_limit.

View File

@ -72,7 +72,7 @@ function system_requirements($phase) {
);
}
if (version_compare($phpversion, DRUPAL_MINIMUM_PHP_DEBIAN) < 0 && version_compare($phpversion, DRUPAL_MINIMUM_PHP) < 0) {
if (version_compare($phpversion, DRUPAL_MINIMUM_PHP) < 0) {
$requirements['php']['description'] = t('Your PHP installation is too old. Drupal requires at least PHP %version.', array('%version' => DRUPAL_MINIMUM_PHP));
$requirements['php']['severity'] = REQUIREMENT_ERROR;
// If PHP is old, it's not safe to continue with the requirements check.