From ac33546d0a7e888e50258c51bb2e99459701ab16 Mon Sep 17 00:00:00 2001
From: "lee.5151" <lee.5151@osu.edu>
Date: Mon, 22 Apr 2024 11:03:51 -0400
Subject: [PATCH] Upgrading drupal/config_ignore (3.2.0 => 3.3.0)

---
 composer.json                                 |  2 +-
 composer.lock                                 | 20 +++++++++----------
 vendor/composer/installed.json                | 20 +++++++++----------
 vendor/composer/installed.php                 | 10 +++++-----
 .../config_ignore/.cspell-project-words.txt   | 17 ++++++++++++++++
 web/modules/config_ignore/composer.json       |  2 +-
 .../config_ignore/config_ignore.info.yml      |  8 ++++----
 .../config_ignore/config_ignore.install       |  9 ++++++++-
 .../ConfigIgnoreEventSubscriber.php           |  9 +++++++--
 .../modules/config_ignore_hook_test.info.yml  |  6 +++---
 .../tests/src/Functional/ConfigIgnoreTest.php | 19 +++++++++++++++++-
 .../tests/src/Kernel/IgnoreKernelTest.php     |  2 +-
 .../tests/src/Kernel/IgnoreSchemaTest.php     |  2 ++
 13 files changed, 87 insertions(+), 39 deletions(-)
 create mode 100644 web/modules/config_ignore/.cspell-project-words.txt

diff --git a/composer.json b/composer.json
index 17f842fe15..00df91e3ab 100644
--- a/composer.json
+++ b/composer.json
@@ -104,7 +104,7 @@
         "drupal/bootstrap": "3.30",
         "drupal/cache_control_override": "^2.0",
         "drupal/ckeditor_indentblock": "^1.0",
-        "drupal/config_ignore": "^3.0",
+        "drupal/config_ignore": "3.3",
         "drupal/core-composer-scaffold": "10.2.5",
         "drupal/core-recommended": "10.2.5",
         "drupal/crop": "2.3",
diff --git a/composer.lock b/composer.lock
index 645cb3b6eb..fb92fd4586 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
         "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
         "This file is @generated automatically"
     ],
-    "content-hash": "92f52958c86bf4fb794e36c3421465de",
+    "content-hash": "4a6200dbd9ea240498fb22a41c4dafce",
     "packages": [
         {
             "name": "asm89/stack-cors",
@@ -2135,20 +2135,20 @@
         },
         {
             "name": "drupal/config_ignore",
-            "version": "3.2.0",
+            "version": "3.3.0",
             "source": {
                 "type": "git",
                 "url": "https://git.drupalcode.org/project/config_ignore.git",
-                "reference": "8.x-3.2"
+                "reference": "8.x-3.3"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://ftp.drupal.org/files/projects/config_ignore-8.x-3.2.zip",
-                "reference": "8.x-3.2",
-                "shasum": "00335fc1ddeb4ed93f245dd6963d99b3c084c052"
+                "url": "https://ftp.drupal.org/files/projects/config_ignore-8.x-3.3.zip",
+                "reference": "8.x-3.3",
+                "shasum": "4446811ecb023820a57c227d35c034e0d4363a70"
             },
             "require": {
-                "drupal/core": "^8.8 || ^9 || ^10"
+                "drupal/core": "^8.8 || ^9 || ^10 || ^11"
             },
             "require-dev": {
                 "drupal/config_filter": "^1.8||^2.2",
@@ -2157,8 +2157,8 @@
             "type": "drupal-module",
             "extra": {
                 "drupal": {
-                    "version": "8.x-3.2",
-                    "datestamp": "1705226226",
+                    "version": "8.x-3.3",
+                    "datestamp": "1713299496",
                     "security-coverage": {
                         "status": "covered",
                         "message": "Covered by Drupal's security advisory policy"
@@ -2167,7 +2167,7 @@
             },
             "notification-url": "https://packages.drupal.org/8/downloads",
             "license": [
-                "GPL-2.0+"
+                "GPL-2.0-or-later"
             ],
             "authors": [
                 {
diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json
index 9eafc3ab02..19f699ec4d 100644
--- a/vendor/composer/installed.json
+++ b/vendor/composer/installed.json
@@ -2239,21 +2239,21 @@
         },
         {
             "name": "drupal/config_ignore",
-            "version": "3.2.0",
-            "version_normalized": "3.2.0.0",
+            "version": "3.3.0",
+            "version_normalized": "3.3.0.0",
             "source": {
                 "type": "git",
                 "url": "https://git.drupalcode.org/project/config_ignore.git",
-                "reference": "8.x-3.2"
+                "reference": "8.x-3.3"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://ftp.drupal.org/files/projects/config_ignore-8.x-3.2.zip",
-                "reference": "8.x-3.2",
-                "shasum": "00335fc1ddeb4ed93f245dd6963d99b3c084c052"
+                "url": "https://ftp.drupal.org/files/projects/config_ignore-8.x-3.3.zip",
+                "reference": "8.x-3.3",
+                "shasum": "4446811ecb023820a57c227d35c034e0d4363a70"
             },
             "require": {
-                "drupal/core": "^8.8 || ^9 || ^10"
+                "drupal/core": "^8.8 || ^9 || ^10 || ^11"
             },
             "require-dev": {
                 "drupal/config_filter": "^1.8||^2.2",
@@ -2262,8 +2262,8 @@
             "type": "drupal-module",
             "extra": {
                 "drupal": {
-                    "version": "8.x-3.2",
-                    "datestamp": "1705226226",
+                    "version": "8.x-3.3",
+                    "datestamp": "1713299496",
                     "security-coverage": {
                         "status": "covered",
                         "message": "Covered by Drupal's security advisory policy"
@@ -2273,7 +2273,7 @@
             "installation-source": "dist",
             "notification-url": "https://packages.drupal.org/8/downloads",
             "license": [
-                "GPL-2.0+"
+                "GPL-2.0-or-later"
             ],
             "authors": [
                 {
diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php
index 2809e79d6b..d1493f9c39 100644
--- a/vendor/composer/installed.php
+++ b/vendor/composer/installed.php
@@ -3,7 +3,7 @@
         'name' => 'osu-asc-webservices/d8-upstream',
         'pretty_version' => 'dev-main',
         'version' => 'dev-main',
-        'reference' => '81b19564eb1adeb564686b2269e82fe176fcbd11',
+        'reference' => '4ebadb713dc203680a7818fa5fda2eba3ec1ee73',
         'type' => 'project',
         'install_path' => __DIR__ . '/../../',
         'aliases' => array(),
@@ -350,9 +350,9 @@
             'dev_requirement' => false,
         ),
         'drupal/config_ignore' => array(
-            'pretty_version' => '3.2.0',
-            'version' => '3.2.0.0',
-            'reference' => '8.x-3.2',
+            'pretty_version' => '3.3.0',
+            'version' => '3.3.0.0',
+            'reference' => '8.x-3.3',
             'type' => 'drupal-module',
             'install_path' => __DIR__ . '/../../web/modules/config_ignore',
             'aliases' => array(),
@@ -1402,7 +1402,7 @@
         'osu-asc-webservices/d8-upstream' => array(
             'pretty_version' => 'dev-main',
             'version' => 'dev-main',
-            'reference' => '81b19564eb1adeb564686b2269e82fe176fcbd11',
+            'reference' => '4ebadb713dc203680a7818fa5fda2eba3ec1ee73',
             'type' => 'project',
             'install_path' => __DIR__ . '/../../',
             'aliases' => array(),
diff --git a/web/modules/config_ignore/.cspell-project-words.txt b/web/modules/config_ignore/.cspell-project-words.txt
new file mode 100644
index 0000000000..e2f8870843
--- /dev/null
+++ b/web/modules/config_ignore/.cspell-project-words.txt
@@ -0,0 +1,17 @@
+anonim
+autentificat
+behaviour
+csslint
+ersetztes
+Formated
+Ignoriertes
+Jørgensen
+Logat
+Lynge
+Neues
+neues
+nord
+phplint
+Utilizator
+Vizitator
+webform
diff --git a/web/modules/config_ignore/composer.json b/web/modules/config_ignore/composer.json
index 21f5191189..065f5da2e2 100644
--- a/web/modules/config_ignore/composer.json
+++ b/web/modules/config_ignore/composer.json
@@ -20,7 +20,7 @@
     "issues": "http://drupal.org/project/config_ignore",
     "source": "https://git.drupalcode.org/project/config_ignore"
   },
-  "license": "GPL-2.0+",
+  "license": "GPL-2.0-or-later",
   "minimum-stability": "dev",
   "require-dev": {
     "drupal/config_filter": "^1.8||^2.2",
diff --git a/web/modules/config_ignore/config_ignore.info.yml b/web/modules/config_ignore/config_ignore.info.yml
index fdf632ece7..14e8a20eb1 100644
--- a/web/modules/config_ignore/config_ignore.info.yml
+++ b/web/modules/config_ignore/config_ignore.info.yml
@@ -1,11 +1,11 @@
 name: Config Ignore
 type: module
 description: Ignore certain configuration during imports and exports
-core_version_requirement: ^8.8 || ^9 || ^10
+core_version_requirement: ^8.8 || ^9 || ^10 || ^11
 package: Config
 configure: config_ignore.settings
 
-# Information added by Drupal.org packaging script on 2024-01-14
-version: '8.x-3.2'
+# Information added by Drupal.org packaging script on 2024-04-16
+version: '8.x-3.3'
 project: 'config_ignore'
-datestamp: 1705226227
+datestamp: 1713299497
diff --git a/web/modules/config_ignore/config_ignore.install b/web/modules/config_ignore/config_ignore.install
index 1fec654aa2..3ac219212c 100644
--- a/web/modules/config_ignore/config_ignore.install
+++ b/web/modules/config_ignore/config_ignore.install
@@ -36,7 +36,14 @@ function config_ignore_update_8301() {
  */
 function config_ignore_update_8302() {
   $config = \Drupal::configFactory()->getEditable('config_ignore.settings');
-  $object = new ConfigIgnoreConfig('simple', $config->get('ignored_config_entities'));
+  $existing = $config->get('mode');
+  if ($existing) {
+    if (!in_array($existing, ['simple', 'intermediate', 'advanced'])) {
+      throw new UnexpectedValueException(sprintf('The mode of the config ignore settings is set but not an expected value: %s', (string) $existing));
+    }
+    return;
+  }
+  $object = new ConfigIgnoreConfig('simple', $config->get('ignored_config_entities') ?? []);
   // Save the config with the mode set and the settings sorted.
   $config->set('mode', 'simple');
   $config->set('ignored_config_entities', $object->getFormated('simple'));
diff --git a/web/modules/config_ignore/src/EventSubscriber/ConfigIgnoreEventSubscriber.php b/web/modules/config_ignore/src/EventSubscriber/ConfigIgnoreEventSubscriber.php
index 266cbe7b67..e4efd151bf 100644
--- a/web/modules/config_ignore/src/EventSubscriber/ConfigIgnoreEventSubscriber.php
+++ b/web/modules/config_ignore/src/EventSubscriber/ConfigIgnoreEventSubscriber.php
@@ -87,9 +87,10 @@ public function invalidateTags(array $tags) {
    * {@inheritdoc}
    */
   public static function getSubscribedEvents(): array {
+    // phpcs:disable Drupal.Arrays.Array.LongLineDeclaration
     return [
-      ConfigEvents::STORAGE_TRANSFORM_IMPORT => ['onImportTransform', Settings::get('config_ignore_import_priority', 0)],
-      ConfigEvents::STORAGE_TRANSFORM_EXPORT => ['onExportTransform', Settings::get('config_ignore_export_priority', 0)],
+      ConfigEvents::STORAGE_TRANSFORM_IMPORT => ['onImportTransform', Settings::get('config_ignore_import_priority', -100)],
+      ConfigEvents::STORAGE_TRANSFORM_EXPORT => ['onExportTransform', Settings::get('config_ignore_export_priority', -100)],
     ];
   }
 
@@ -133,6 +134,10 @@ protected function transformStorage(StorageInterface $transformation_storage, St
 
     // Get the config ignore settings form the transformation storage.
     $transformation_storage = $transformation_storage->createCollection(StorageInterface::DEFAULT_COLLECTION);
+    if (empty($transformation_storage->listAll())) {
+      // Skip if the transformation storage is empty in the default collection.
+      return;
+    }
     if ($transformation_storage->exists('config_ignore.settings')) {
       try {
         // This can be used to hook into config ignore via an event subscriber
diff --git a/web/modules/config_ignore/tests/modules/config_ignore_hook_test.info.yml b/web/modules/config_ignore/tests/modules/config_ignore_hook_test.info.yml
index 0574eeaf74..c485fab848 100644
--- a/web/modules/config_ignore/tests/modules/config_ignore_hook_test.info.yml
+++ b/web/modules/config_ignore/tests/modules/config_ignore_hook_test.info.yml
@@ -6,7 +6,7 @@ hidden: true
 dependencies:
   - config_ignore
 
-# Information added by Drupal.org packaging script on 2024-01-14
-version: '8.x-3.2'
+# Information added by Drupal.org packaging script on 2024-04-16
+version: '8.x-3.3'
 project: 'config_ignore'
-datestamp: 1705226227
+datestamp: 1713299497
diff --git a/web/modules/config_ignore/tests/src/Functional/ConfigIgnoreTest.php b/web/modules/config_ignore/tests/src/Functional/ConfigIgnoreTest.php
index 4de3435686..0d72235745 100644
--- a/web/modules/config_ignore/tests/src/Functional/ConfigIgnoreTest.php
+++ b/web/modules/config_ignore/tests/src/Functional/ConfigIgnoreTest.php
@@ -34,13 +34,30 @@ public function testSettingsForm() {
     ];
 
     $this->drupalGet('admin/config/development/configuration/ignore');
-    $this->submitForm($edit, $this->t('Save configuration'));
+    $this->submitForm($edit, (string) $this->t('Save configuration'));
 
     $settings = $this->config('config_ignore.settings')->get('ignored_config_entities');
 
     $this->assertEquals(['config.test_01', 'config.test_02'], $settings);
   }
 
+  /**
+   * Verify that the config sync form loads after ignore settings are saved.
+   *
+   * Also installs core field module.
+   */
+  public function testSynchronizeForm() {
+    $this->container->get('module_installer')->install(['field']);
+    $this->drupalLogin($this->drupalCreateUser(['import configuration', 'synchronize configuration']));
+    $edit = [
+      'ignored_config_entities' => "system.site" . "\r\n" . "'system.menu.*'",
+    ];
+    $this->drupalGet('admin/config/development/configuration/ignore');
+    $this->submitForm($edit, (string) $this->t('Save configuration'));
+    $this->drupalGet('admin/config/development/configuration');
+    $this->assertSession()->statusCodeEquals(200);
+  }
+
   /**
    * Verify that config can get ignored.
    */
diff --git a/web/modules/config_ignore/tests/src/Kernel/IgnoreKernelTest.php b/web/modules/config_ignore/tests/src/Kernel/IgnoreKernelTest.php
index e65a13d844..6222d486f7 100644
--- a/web/modules/config_ignore/tests/src/Kernel/IgnoreKernelTest.php
+++ b/web/modules/config_ignore/tests/src/Kernel/IgnoreKernelTest.php
@@ -104,7 +104,7 @@ public function testExport(string $mode, array $patterns, array $active, array $
    * choice, and we implemented the more strict definition of "ignore".
    * A commented out scenario for the more "lenient" option remained in the list
    * So that we could assert it when implementing a feature that allows one to
-   * configure the behaviour. It is configured differntly than originally
+   * configure the behaviour. It is configured differently than originally
    * anticipated. So this method sets up the config in the new way to cater to
    * the test scenario.
    *
diff --git a/web/modules/config_ignore/tests/src/Kernel/IgnoreSchemaTest.php b/web/modules/config_ignore/tests/src/Kernel/IgnoreSchemaTest.php
index 328e26a048..a8ea67ac7e 100644
--- a/web/modules/config_ignore/tests/src/Kernel/IgnoreSchemaTest.php
+++ b/web/modules/config_ignore/tests/src/Kernel/IgnoreSchemaTest.php
@@ -11,6 +11,8 @@
 
 /**
  * Test the schema.
+ *
+ * @group config_ignore
  */
 class IgnoreSchemaTest extends KernelTestBase {
 
-- 
GitLab