From 7886fa9232ded6712f2e113458c7d8f642489f07 Mon Sep 17 00:00:00 2001 From: tedbow <tedbow@240860.no-reply.drupal.org> Date: Tue, 17 Aug 2021 13:54:46 +0000 Subject: [PATCH] Issue #3227588 by tedbow: Remove duplicate calls to validation in updater now that caller should validate --- src/BatchProcessor.php | 9 --------- src/Updater.php | 13 ------------- 2 files changed, 22 deletions(-) diff --git a/src/BatchProcessor.php b/src/BatchProcessor.php index 2c315f0c5d..4086d2a7e1 100644 --- a/src/BatchProcessor.php +++ b/src/BatchProcessor.php @@ -90,15 +90,6 @@ class BatchProcessor { } } - /** - * Calls the updater's validateStaged() method. - * - * @see \Drupal\automatic_updates\Updater::validateStaged() - */ - public static function validateStaged() { - static::getUpdater()->validateStaged(); - } - /** * Finishes the batch job. * diff --git a/src/Updater.php b/src/Updater.php index 5c88ef3895..c19b10ccb6 100644 --- a/src/Updater.php +++ b/src/Updater.php @@ -160,13 +160,8 @@ class Updater { * * @return string * A key for this stage update process. - * - * @throws \Drupal\automatic_updates\Exception\UpdateException - * Thrown if any readiness checkers return results with an error. Warnings - * from readiness checker will not stop an update. */ public function begin(): string { - $this->dispatchUpdateEvent(AutomaticUpdatesEvents::PRE_START); $stage_key = $this->createActiveStage(); $this->beginner->begin(static::getActiveDirectory(), static::getStageDirectory(), NULL, 120, $this->getExclusions()); return $stage_key; @@ -241,7 +236,6 @@ class Updater { * Commits the current update. */ public function commit(): void { - $this->dispatchUpdateEvent(AutomaticUpdatesEvents::PRE_COMMIT); $this->committer->commit($this->getStageDirectory(), static::getActiveDirectory()); } @@ -313,13 +307,6 @@ class Updater { return $value; } - /** - * Validates that an update was performed as expected. - */ - public function validateStaged():void { - $this->dispatchUpdateEvent(AutomaticUpdatesEvents::PRE_COMMIT); - } - /** * Dispatches an update event. * -- GitLab