Drupal::MINIMUM_PHP
Same name in other branches
- 10 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.
3 uses of Drupal::MINIMUM_PHP
- 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.
- system_requirements in core/
modules/ system/ system.install - Implements hook_requirements().
File
-
core/
lib/ Drupal.php, line 126
Class
- Drupal
- Static Service Container wrapper.
Code
const MINIMUM_PHP = '7.3.0';
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.