Drupal::MINIMUM_PHP
Same name in other branches
- 9 core/lib/Drupal.php \Drupal::MINIMUM_PHP
- 11.x core/lib/Drupal.php \Drupal::MINIMUM_PHP
Minimum allowed version of PHP for Drupal to be bootstrapped.
Below this version:
- The installer cannot be run.
- Updates cannot be run.
- Modules and themes cannot be enabled.
- If a site managed to bypass all of the above, then an error is shown in the status report and various fatal errors occur on various pages.
Note: To prevent the installer from having fatal errors on older versions of PHP, the value of this constant is hardcoded twice in core/install.php:
- Once as a parameter of version_compare()
- Once in the error message printed to the user immediately after.
Remember to update both whenever this constant is updated.
6 uses of Drupal::MINIMUM_PHP
- ComponentGenerator::initialPackageMetadata in composer/
Generator/ ComponentGenerator.php - Common default metadata for all components.
- ComposerTest::testEnsurePhpConfiguredVersion in core/
tests/ Drupal/ Tests/ Composer/ ComposerTest.php - Ensure that the configured php version matches the minimum php version.
- DrupalTest::testPhpConstants in core/
tests/ Drupal/ Tests/ Core/ DrupalTest.php - Tests the PHP constants have consistent values.
- hook_requirements in core/
lib/ Drupal/ Core/ Extension/ module.api.php - Check installation requirements and do status reporting.
- install_profile_info in core/
includes/ install.inc - Retrieves information about an installation profile from its .info.yml file.
File
-
core/
lib/ Drupal.php, line 116
Class
- Drupal
- Static Service Container wrapper.
Code
const MINIMUM_PHP = '8.1.0';
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.