diff --git a/core/includes/bootstrap.inc b/core/includes/bootstrap.inc index e18bfa2..68d8cb8 100644 --- a/core/includes/bootstrap.inc +++ b/core/includes/bootstrap.inc @@ -22,6 +22,10 @@ * * Updates cannot be run on versions of PHP older than this version. * + * The installer exits early on versions of PHP older than this version. + * + * @see install.php + * * @todo Move this to an appropriate autoloadable class. See * https://www.drupal.org/project/drupal/issues/2908079 */ @@ -33,7 +37,7 @@ * @todo Move this to an appropriate autoloadable class. See * https://www.drupal.org/project/drupal/issues/2908079 */ -const DRUPAL_MINIMUM_INSTALL_PHP = '7.0.0'; +const DRUPAL_MINIMUM_INSTALL_PHP = '7.0.8'; /** * Minimum recommended version of PHP. diff --git a/core/modules/simpletest/src/InstallerTestBase.php b/core/modules/simpletest/src/InstallerTestBase.php index d51b2e9..072bb58 100644 --- a/core/modules/simpletest/src/InstallerTestBase.php +++ b/core/modules/simpletest/src/InstallerTestBase.php @@ -253,7 +253,7 @@ protected function refreshVariables() { * a warning not in the list is present, a fail is raised. */ protected function continueOnExpectedWarnings($expected_warnings = []) { - $this->assertFalse(strpos($this->getTextContent(), 'Errors found')); + $this->assertNoText('Errors found'); $this->assertWarningSummaries($expected_warnings); $this->clickLink('continue anyway'); } diff --git a/core/modules/system/system.install b/core/modules/system/system.install index 6131f72..37d1e77 100644 --- a/core/modules/system/system.install +++ b/core/modules/system/system.install @@ -187,7 +187,7 @@ 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']['description'] = t('Your PHP installation is too old. Drupal requires at least PHP %version.', ['%version' => DRUPAL_MINIMUM_INSTALL_PHP]); $requirements['php']['severity'] = REQUIREMENT_ERROR; // If PHP is old, it's not safe to continue with the requirements check. return $requirements; @@ -203,8 +203,6 @@ function system_requirements($phase) { elseif (!drupal_valid_test_ua()) { $requirements['php']['description'] = t('Your PHP installation is too old. Drupal requires at least PHP %version.', ['%version' => DRUPAL_MINIMUM_INSTALL_PHP]); $requirements['php']['severity'] = REQUIREMENT_ERROR; - // If PHP is old, it's not safe to continue with the requirements check. - return $requirements; } } if (version_compare($phpversion, DRUPAL_RECOMMENDED_PHP) < 0) { diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerTestBase.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerTestBase.php index 6e48b4c..6a0a3b9 100644 --- a/core/tests/Drupal/FunctionalTests/Installer/InstallerTestBase.php +++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerTestBase.php @@ -284,7 +284,7 @@ protected function refreshVariables() { * a warning not in the list is present, a fail is raised. */ protected function continueOnExpectedWarnings($expected_warnings = []) { - $this->assertFalse(strpos($this->getTextContent(), 'Errors found')); + $this->assertNoText('Errors found'); $this->assertWarningSummaries($expected_warnings); $this->clickLink('continue anyway'); $this->checkForMetaRefresh(); diff --git a/core/tests/Drupal/Tests/RequirementsPageTrait.php b/core/tests/Drupal/Tests/RequirementsPageTrait.php index 6687cdf..fc30c8c 100644 --- a/core/tests/Drupal/Tests/RequirementsPageTrait.php +++ b/core/tests/Drupal/Tests/RequirementsPageTrait.php @@ -15,23 +15,12 @@ * link to go to the next screen. */ protected function continueOnExpectedWarnings($link_label) { - if (strpos($this->getTextContent(), 'Requirements problem') === FALSE) { - return; - } - - $this->assertNoText('Errors found'); - $this->assertRequirementWarnings(); - $this->clickLink($link_label); - $this->checkForMetaRefresh(); - } - - /** - * Assert the expected requirement warnings are present on the page. - */ - protected function assertRequirementWarnings() { // Assert a warning is shown on older test environments. if (version_compare(phpversion(), DRUPAL_MINIMUM_INSTALL_PHP) < 0) { + $this->assertNoText('Errors found'); $this->assertWarningSummaries(['PHP']); + $this->clickLink($link_label); + $this->checkForMetaRefresh(); } }