You are here

class BlacklistPhp72Versions in Automatic Updates 8

Blacklisted PHP 7.2 version checker.

Hierarchy

Expanded class hierarchy of BlacklistPhp72Versions

1 file declares its use of BlacklistPhp72Versions
SupportedPhpVersionTest.php in tests/src/Kernel/ReadinessChecker/SupportedPhpVersionTest.php
1 string reference to 'BlacklistPhp72Versions'
automatic_updates.services.yml in ./automatic_updates.services.yml
automatic_updates.services.yml
1 service uses BlacklistPhp72Versions
automatic_updates.blacklist_php_72 in ./automatic_updates.services.yml
Drupal\automatic_updates\ReadinessChecker\BlacklistPhp72Versions

File

src/ReadinessChecker/BlacklistPhp72Versions.php, line 11

Namespace

Drupal\automatic_updates\ReadinessChecker
View source
class BlacklistPhp72Versions extends SupportedPhpVersion {
  use StringTranslationTrait;

  /**
   * {@inheritdoc}
   */
  protected function getUnsupportedVersionConstraint() {
    $parser = new VersionParser();

    // Rather than make things complicated with cli vs non-cli PHP and
    // differences in their support of opcache, libsodium and Sodium_Compat,
    // simply blacklist the entire version range to ensure the best possible
    // and coherent update support.
    return $parser
      ->parseConstraints('>=7.2.0 <=7.2.2');
  }

  /**
   * {@inheritdoc}
   */
  protected function getMessage() {
    return $this
      ->t('PHP 7.2.0, 7.2.1 and 7.2.2 have issues with opcache that breaks signature validation. Please upgrade to a newer version of PHP to ensure assurance and security for package signing.');
  }

}

Members

Namesort descending Modifiers Type Description Overrides
BlacklistPhp72Versions::getMessage protected function Get the message to return if the current PHP version is unsupported. Overrides SupportedPhpVersion::getMessage
BlacklistPhp72Versions::getUnsupportedVersionConstraint protected function Get the unsupported PHP version constraint. Overrides SupportedPhpVersion::getUnsupportedVersionConstraint
StringTranslationTrait::$stringTranslation protected property The string translation service. 1
StringTranslationTrait::formatPlural protected function Formats a string containing a count of items.
StringTranslationTrait::getNumberOfPlurals protected function Returns the number of plurals supported by a given language.
StringTranslationTrait::getStringTranslation protected function Gets the string translation service.
StringTranslationTrait::setStringTranslation public function Sets the string translation service to use. 2
StringTranslationTrait::t protected function Translates a string to the current language or to a given language.
SupportedPhpVersion::getPhpVersion protected function Get the PHP version. 2
SupportedPhpVersion::run public function Run check. Overrides ReadinessCheckerInterface::run