class MinimumPhpVersion in Automatic Updates 8
Minimum PHP version checker.
Hierarchy
- class \Drupal\automatic_updates\ReadinessChecker\SupportedPhpVersion implements ReadinessCheckerInterface
- class \Drupal\automatic_updates\ReadinessChecker\MinimumPhpVersion uses StringTranslationTrait
Expanded class hierarchy of MinimumPhpVersion
1 file declares its use of MinimumPhpVersion
- SupportedPhpVersionTest.php in tests/
src/ Kernel/ ReadinessChecker/ SupportedPhpVersionTest.php
1 string reference to 'MinimumPhpVersion'
1 service uses MinimumPhpVersion
File
- src/
ReadinessChecker/ MinimumPhpVersion.php, line 11
Namespace
Drupal\automatic_updates\ReadinessCheckerView source
class MinimumPhpVersion extends SupportedPhpVersion {
use StringTranslationTrait;
/**
* {@inheritdoc}
*/
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);
}
/**
* {@inheritdoc}
*/
protected function getMessage() {
return $this
->t('This site is running on an unsupported version of PHP. It cannot be updated. Please update to at least PHP @version.', [
'@version' => DRUPAL_MINIMUM_SUPPORTED_PHP,
]);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
MinimumPhpVersion:: |
protected | function |
Get the message to return if the current PHP version is unsupported. Overrides SupportedPhpVersion:: |
|
MinimumPhpVersion:: |
protected | function |
Get the unsupported PHP version constraint. Overrides SupportedPhpVersion:: |
|
StringTranslationTrait:: |
protected | property | The string translation service. | 1 |
StringTranslationTrait:: |
protected | function | Formats a string containing a count of items. | |
StringTranslationTrait:: |
protected | function | Returns the number of plurals supported by a given language. | |
StringTranslationTrait:: |
protected | function | Gets the string translation service. | |
StringTranslationTrait:: |
public | function | Sets the string translation service to use. | 2 |
StringTranslationTrait:: |
protected | function | Translates a string to the current language or to a given language. | |
SupportedPhpVersion:: |
protected | function | Get the PHP version. | 2 |
SupportedPhpVersion:: |
public | function |
Run check. Overrides ReadinessCheckerInterface:: |