function automatic_updates_requirements in Automatic Updates 8.2
Same name and namespace in other branches
- 8 automatic_updates.install \automatic_updates_requirements()
- 7 automatic_updates.install \automatic_updates_requirements()
Implements hook_requirements().
File
- ./
automatic_updates.install, line 13 - Contains install and update functions for Automatic Updates.
Code
function automatic_updates_requirements($phase) {
if ($phase === 'runtime') {
/** @var \Drupal\automatic_updates\Validation\ReadinessRequirements $readiness_requirement */
$readiness_requirement = \Drupal::classResolver(ReadinessRequirements::class);
return $readiness_requirement
->getRequirements();
}
if ($phase === 'install' && !class_exists('PhpTuf\\ComposerStager\\Domain\\Beginner')) {
return [
'automatic_updates' => [
'description' => t('External dependencies for Automatic Updates are not available. Composer must be used to download the module with dependencies.'),
'severity' => REQUIREMENT_ERROR,
],
];
}
}