Skip to content
Snippets Groups Projects

Issue #3254755: Add a seperate Update recommender and update version validator for cron updates

1 file
+ 3
1
Compare changes
  • Side-by-side
  • Inline
@@ -51,7 +51,8 @@ class UpdateVersionValidator implements EventSubscriberInterface {
// 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();
\Drupal::logger('automatic_updates')->debug("Make sure we access directly Drupal::VERSION" . \Drupal::VERSION);
$available_updates = update_get_available(TRUE);
$available_updates = update_calculate_project_data($available_updates);
return $available_updates['drupal']['existing_version'];
}
@@ -64,6 +65,7 @@ class UpdateVersionValidator implements EventSubscriberInterface {
*/
public function checkUpdateVersion(PreOperationStageEvent $event): void {
$stage = $event->getStage();
$this->getCoreVersion();
// We only want to do this check if the stage belongs to Automatic Updates.
if (!$stage instanceof Updater) {
return;
Loading