You are here

public static function BlacklistPhp72Versions::run in Automatic Updates 7

Run check.

Return value

array An array of translatable strings.

Overrides ReadinessCheckerInterface::run

File

ReadinessCheckers/BlacklistPhp72Versions.php, line 13

Class

BlacklistPhp72Versions
Blacklisted PHP 7.2 version checker.

Code

public static function run() {
  $project_root = drupal_get_path('module', 'automatic_updates');
  require_once $project_root . DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR . 'autoload.php';
  $messages = [];
  $parser = new VersionParser();
  $unsupported_constraint = static::getUnsupportedVersionConstraint();
  if ($unsupported_constraint
    ->matches($parser
    ->parseConstraints(static::getPhpVersion()))) {
    $messages[] = static::getMessage();
  }
  return $messages;
}