You are here

protected function UpdateVersionValidator::getCoreVersion in Automatic Updates 8.2

Returns the running core version, according to the Update module.

Return value

string The running core version as known to the Update module.

1 call to UpdateVersionValidator::getCoreVersion()
UpdateVersionValidator::checkUpdateVersion in src/Validator/UpdateVersionValidator.php
Validates that core is not being updated to another minor or major version.

File

src/Validator/UpdateVersionValidator.php, line 37

Class

UpdateVersionValidator
Validates that core updates are within a supported version range.

Namespace

Drupal\automatic_updates\Validator

Code

protected function getCoreVersion() : string {

  // We need to call these functions separately, because
  // update_get_available() will include the file that contains
  // update_calculate_project_data().
  $available_updates = update_get_available();
  $available_updates = update_calculate_project_data($available_updates);
  return $available_updates['drupal']['existing_version'];
}