You are here

protected function MinimumPhpVersion::getUnsupportedVersionConstraint in Automatic Updates 8

Get the unsupported PHP version constraint.

Return value

\Composer\Semver\Constraint\ConstraintInterface The version constraint.

Overrides SupportedPhpVersion::getUnsupportedVersionConstraint

File

src/ReadinessChecker/MinimumPhpVersion.php, line 17

Class

MinimumPhpVersion
Minimum PHP version checker.

Namespace

Drupal\automatic_updates\ReadinessChecker

Code

protected function getUnsupportedVersionConstraint() {
  $parser = new VersionParser();

  // Constant was introduced in 8.7.0-beta1, back fill for full 8.7 support.
  defined('DRUPAL_MINIMUM_SUPPORTED_PHP') or define('DRUPAL_MINIMUM_SUPPORTED_PHP', '7.0.8');
  return $parser
    ->parseConstraints('<' . DRUPAL_MINIMUM_SUPPORTED_PHP);
}