From 0439701d6f139f60c6eb5059ff07bc4db984596a Mon Sep 17 00:00:00 2001 From: Dave Long <dave@longwaveconsulting.com> Date: Fri, 12 Jan 2024 12:14:23 +0000 Subject: [PATCH] Issue #3405574 by alexpott, borisson_: StorageComparerInterface() is missing createChangelist() and docs for StorageComparer::addChangeList(sort_order) are wrong --- core/lib/Drupal/Core/Config/StorageComparer.php | 6 +++--- core/lib/Drupal/Core/Config/StorageComparerInterface.php | 8 ++++++++ 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/core/lib/Drupal/Core/Config/StorageComparer.php b/core/lib/Drupal/Core/Config/StorageComparer.php index 76521629c25d..d77f2e6e455e 100644 --- a/core/lib/Drupal/Core/Config/StorageComparer.php +++ b/core/lib/Drupal/Core/Config/StorageComparer.php @@ -205,9 +205,9 @@ public function getChangelist($op = NULL, $collection = StorageInterface::DEFAUL * The change operation performed. Either delete, create, rename, or update. * @param array $changes * Array of changes to add to the changelist. - * @param array $sort_order - * Array to sort that can be used to sort the changelist. This array must - * contain all the items that are in the change list. + * @param array|null $sort_order + * (optional) Array to sort that can be used to sort the changelist. This + * array must contain all the items that are in the change list. */ protected function addChangeList($collection, $op, array $changes, array $sort_order = NULL) { // Only add changes that aren't already listed. diff --git a/core/lib/Drupal/Core/Config/StorageComparerInterface.php b/core/lib/Drupal/Core/Config/StorageComparerInterface.php index 7961b4ec0fb2..09e322bf6edd 100644 --- a/core/lib/Drupal/Core/Config/StorageComparerInterface.php +++ b/core/lib/Drupal/Core/Config/StorageComparerInterface.php @@ -65,6 +65,14 @@ public function getEmptyChangelist(); */ public function getChangelist($op = NULL, $collection = StorageInterface::DEFAULT_COLLECTION); + /** + * Calculates the differences. + * + * @return $this + * An object which implements the StorageComparerInterface. + */ + public function createChangelist(); + /** * Recalculates the differences. * -- GitLab