Skip to content
Snippets Groups Projects
Commit 424d9476 authored by Ted Bowman's avatar Ted Bowman Committed by Adam G-H
Browse files

Issue #3272520 by tedbow: Change ReadinessCheckEvent to expect a Stage and not an Updater

parent 39986999
No related branches found
No related tags found
No related merge requests found
......@@ -2,9 +2,9 @@
namespace Drupal\automatic_updates\Event;
use Drupal\automatic_updates\Updater;
use Drupal\Core\StringTranslation\TranslatableMarkup;
use Drupal\package_manager\Event\PreOperationStageEvent;
use Drupal\package_manager\Stage;
use Drupal\package_manager\ValidationResult;
/**
......@@ -31,14 +31,14 @@ class ReadinessCheckEvent extends PreOperationStageEvent {
/**
* Constructs a ReadinessCheckEvent object.
*
* @param \Drupal\automatic_updates\Updater $updater
* The updater service.
* @param \Drupal\package_manager\Stage $stage
* The stage service.
* @param string[] $project_versions
* (optional) The versions of the packages to update to, keyed by package
* name.
*/
public function __construct(Updater $updater, array $project_versions = []) {
parent::__construct($updater);
public function __construct(Stage $stage, array $project_versions = []) {
parent::__construct($stage);
if ($project_versions) {
if (count($project_versions) !== 1 || !array_key_exists('drupal', $project_versions)) {
throw new \InvalidArgumentException("Currently only updates to Drupal core are supported.");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment