Drupal has two constants for the minimum PHP version: \Drupal::MINMUM_PHP
(below which Drupal cannot run at all), and \Drupal::MINIMUM_SUPPORTED_PHP
(below which sites can be run and updated, but a warning is displayed on update and an error on the status report). This is used to allow sites to continue to receive security updates even if support for their PHP version is being phased out.
Previously, we made PHP versions below \Drupal::MINIMUM_SUPPORTED_PHP
raise an error on installation, to keep new sites from being built on the unsupported PHP version. However, a common deployment workflow involves installing an existing site from default configuration. To support these workflows, Drupal will now raise an installation warning (instead of an error) when the PHP version is between \Drupal::MINIMUM_PHP
and \Drupal::MINIMUM_SUPPORTED_PHP
.
\Drupal::MINIMUM_PHP
and \Drupal::MINIMUM_SUPPORTED_PHP
have the same value of 7.3.0 in all Drupal 9 versions before 9.4.0, so this does not affect existing sites or workflows. However, scripts or tests developed around the time that Drupal 8 was dropping PHP 5 support may need updates if they have special handling for \Drupal::MINIMUM_SUPPORTED_PHP
.