From 0473cdde1fb99c730c05a26fcb3720b6836737cc Mon Sep 17 00:00:00 2001
From: "lee.5151" <lee.5151@osu.edu>
Date: Mon, 28 Nov 2022 12:59:01 -0500
Subject: [PATCH] Upgrading drupal/link_attributes (1.11.0 => 1.12.0)

---
 composer.json                                 |  2 +-
 composer.lock                                 | 24 +++++++++++--------
 vendor/composer/installed.json                | 24 +++++++++++--------
 vendor/composer/installed.php                 | 10 ++++----
 web/modules/link_attributes/composer.json     | 16 +++++++++++++
 .../link_attributes/link_attributes.info.yml  | 10 ++++----
 .../link_attributes_test_alterinfo.info.yml   |  9 ++++---
 .../Functional/LinkAttributesFieldTest.php    | 10 ++++----
 .../src/Functional/LinkAttributesMenuTest.php |  5 ++--
 .../tests/src/Kernel/InfoAlterTest.php        |  6 ++---
 10 files changed, 70 insertions(+), 46 deletions(-)
 create mode 100644 web/modules/link_attributes/composer.json

diff --git a/composer.json b/composer.json
index fdb70b8e51..5d98cf1148 100644
--- a/composer.json
+++ b/composer.json
@@ -129,7 +129,7 @@
         "drupal/honeypot": "2.1.2",
         "drupal/inline_entity_form": "1.0-rc9",
         "drupal/libraries": "3.0-beta1",
-        "drupal/link_attributes": "1.11",
+        "drupal/link_attributes": "1.12",
         "drupal/linkit": "5.0-beta13",
         "drupal/mathjax": "3.0.0",
         "drupal/media_entity_browser": "2.0-alpha3",
diff --git a/composer.lock b/composer.lock
index 9f77354148..b9752c81ea 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": "34725321c1b77f13acdd41e96c52fb5d",
+    "content-hash": "8a03439958f6586f003650b9c62e2baf",
     "packages": [
         {
             "name": "alchemy/zippy",
@@ -5185,26 +5185,26 @@
         },
         {
             "name": "drupal/link_attributes",
-            "version": "1.11.0",
+            "version": "1.12.0",
             "source": {
                 "type": "git",
                 "url": "https://git.drupalcode.org/project/link_attributes.git",
-                "reference": "8.x-1.11"
+                "reference": "8.x-1.12"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://ftp.drupal.org/files/projects/link_attributes-8.x-1.11.zip",
-                "reference": "8.x-1.11",
-                "shasum": "ca8c7e71c38350e3784dc3d1f779d700f55df818"
+                "url": "https://ftp.drupal.org/files/projects/link_attributes-8.x-1.12.zip",
+                "reference": "8.x-1.12",
+                "shasum": "02f166dcfe3277656e2a91f86ff36e8a18e55524"
             },
             "require": {
-                "drupal/core": "^8 || ^9"
+                "drupal/core": "^9 || ^10"
             },
             "type": "drupal-module",
             "extra": {
                 "drupal": {
-                    "version": "8.x-1.11",
-                    "datestamp": "1598323550",
+                    "version": "8.x-1.12",
+                    "datestamp": "1668801560",
                     "security-coverage": {
                         "status": "covered",
                         "message": "Covered by Drupal's security advisory policy"
@@ -5223,8 +5223,12 @@
             ],
             "description": "Provides a widget to allow settings of link attributes for menu links.",
             "homepage": "https://www.drupal.org/project/link_attributes",
+            "keywords": [
+                "Drupal"
+            ],
             "support": {
-                "source": "https://git.drupalcode.org/project/link_attributes"
+                "source": "https://git.drupalcode.org/project/link_attributes",
+                "issues": "https://www.drupal.org/project/issues/link_attributes"
             }
         },
         {
diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json
index ffdd21e445..b2f934e3bb 100644
--- a/vendor/composer/installed.json
+++ b/vendor/composer/installed.json
@@ -5352,27 +5352,27 @@
         },
         {
             "name": "drupal/link_attributes",
-            "version": "1.11.0",
-            "version_normalized": "1.11.0.0",
+            "version": "1.12.0",
+            "version_normalized": "1.12.0.0",
             "source": {
                 "type": "git",
                 "url": "https://git.drupalcode.org/project/link_attributes.git",
-                "reference": "8.x-1.11"
+                "reference": "8.x-1.12"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://ftp.drupal.org/files/projects/link_attributes-8.x-1.11.zip",
-                "reference": "8.x-1.11",
-                "shasum": "ca8c7e71c38350e3784dc3d1f779d700f55df818"
+                "url": "https://ftp.drupal.org/files/projects/link_attributes-8.x-1.12.zip",
+                "reference": "8.x-1.12",
+                "shasum": "02f166dcfe3277656e2a91f86ff36e8a18e55524"
             },
             "require": {
-                "drupal/core": "^8 || ^9"
+                "drupal/core": "^9 || ^10"
             },
             "type": "drupal-module",
             "extra": {
                 "drupal": {
-                    "version": "8.x-1.11",
-                    "datestamp": "1598323550",
+                    "version": "8.x-1.12",
+                    "datestamp": "1668801560",
                     "security-coverage": {
                         "status": "covered",
                         "message": "Covered by Drupal's security advisory policy"
@@ -5392,8 +5392,12 @@
             ],
             "description": "Provides a widget to allow settings of link attributes for menu links.",
             "homepage": "https://www.drupal.org/project/link_attributes",
+            "keywords": [
+                "Drupal"
+            ],
             "support": {
-                "source": "https://git.drupalcode.org/project/link_attributes"
+                "source": "https://git.drupalcode.org/project/link_attributes",
+                "issues": "https://www.drupal.org/project/issues/link_attributes"
             },
             "install-path": "../../web/modules/link_attributes"
         },
diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php
index bddb3ca2ac..5b4d9b0df3 100644
--- a/vendor/composer/installed.php
+++ b/vendor/composer/installed.php
@@ -3,7 +3,7 @@
         'name' => 'osu-asc-webservices/d8-upstream',
         'pretty_version' => 'dev-master',
         'version' => 'dev-master',
-        'reference' => '429f72e15c8ceea994931b8d1abf14e67c0e8c20',
+        'reference' => 'b32d6543d3f3958296e85fa3c3e6faf263f8a478',
         'type' => 'project',
         'install_path' => __DIR__ . '/../../',
         'aliases' => array(),
@@ -911,9 +911,9 @@
             'dev_requirement' => false,
         ),
         'drupal/link_attributes' => array(
-            'pretty_version' => '1.11.0',
-            'version' => '1.11.0.0',
-            'reference' => '8.x-1.11',
+            'pretty_version' => '1.12.0',
+            'version' => '1.12.0.0',
+            'reference' => '8.x-1.12',
             'type' => 'drupal-module',
             'install_path' => __DIR__ . '/../../web/modules/link_attributes',
             'aliases' => array(),
@@ -1594,7 +1594,7 @@
         'osu-asc-webservices/d8-upstream' => array(
             'pretty_version' => 'dev-master',
             'version' => 'dev-master',
-            'reference' => '429f72e15c8ceea994931b8d1abf14e67c0e8c20',
+            'reference' => 'b32d6543d3f3958296e85fa3c3e6faf263f8a478',
             'type' => 'project',
             'install_path' => __DIR__ . '/../../',
             'aliases' => array(),
diff --git a/web/modules/link_attributes/composer.json b/web/modules/link_attributes/composer.json
new file mode 100644
index 0000000000..2ae08b9b90
--- /dev/null
+++ b/web/modules/link_attributes/composer.json
@@ -0,0 +1,16 @@
+{
+  "name": "drupal/link_attributes",
+  "type": "drupal-module",
+  "description": "Provides a widget to allow settings of link attributes for menu links.",
+  "keywords": [
+    "Drupal"
+  ],
+  "license": "GPL-2.0-or-later",
+  "homepage": "https://www.drupal.org/project/link_attributes",
+  "minimum-stability": "dev",
+  "support": {
+    "issues": "https://www.drupal.org/project/issues/link_attributes",
+    "source": "https://git.drupalcode.org/project/link_attributes"
+  },
+  "require": {}
+}
diff --git a/web/modules/link_attributes/link_attributes.info.yml b/web/modules/link_attributes/link_attributes.info.yml
index 9e127f3271..65c3345978 100644
--- a/web/modules/link_attributes/link_attributes.info.yml
+++ b/web/modules/link_attributes/link_attributes.info.yml
@@ -1,13 +1,11 @@
 name: Link attributes
 type: module
 description: Provides a widget to allow settings of link attributes for menu links.
-core: 8.x
-core_version_requirement: ^8 || ^9
+core_version_requirement: ^9 || ^10
 dependencies:
   - drupal:link
-  - drupal:system (>=8.4)
 
-# Information added by Drupal.org packaging script on 2020-08-25
-version: '8.x-1.11'
+# Information added by Drupal.org packaging script on 2022-11-18
+version: '8.x-1.12'
 project: 'link_attributes'
-datestamp: 1598323551
+datestamp: 1668801562
diff --git a/web/modules/link_attributes/tests/modules/link_attributes_test_alterinfo/link_attributes_test_alterinfo.info.yml b/web/modules/link_attributes/tests/modules/link_attributes_test_alterinfo/link_attributes_test_alterinfo.info.yml
index 704c70e956..8de7c438ac 100644
--- a/web/modules/link_attributes/tests/modules/link_attributes_test_alterinfo/link_attributes_test_alterinfo.info.yml
+++ b/web/modules/link_attributes/tests/modules/link_attributes_test_alterinfo/link_attributes_test_alterinfo.info.yml
@@ -1,12 +1,11 @@
 name: 'Link attributes alterInfo Test'
 description: 'Implements hook_link_attributes_plugin_alter'
 type: module
-core: 8.x
-core_version_requirement: ^8 || ^9
+core_version_requirement: ^9 || ^10
 dependencies:
   - link_attributes:link_attributes
 
-# Information added by Drupal.org packaging script on 2020-08-25
-version: '8.x-1.11'
+# Information added by Drupal.org packaging script on 2022-11-18
+version: '8.x-1.12'
 project: 'link_attributes'
-datestamp: 1598323551
+datestamp: 1668801562
diff --git a/web/modules/link_attributes/tests/src/Functional/LinkAttributesFieldTest.php b/web/modules/link_attributes/tests/src/Functional/LinkAttributesFieldTest.php
index d2d7ca35f8..3c6bb9bb3f 100644
--- a/web/modules/link_attributes/tests/src/Functional/LinkAttributesFieldTest.php
+++ b/web/modules/link_attributes/tests/src/Functional/LinkAttributesFieldTest.php
@@ -17,7 +17,7 @@ class LinkAttributesFieldTest extends BrowserTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'node',
     'link_attributes',
     'field_ui',
@@ -40,12 +40,13 @@ class LinkAttributesFieldTest extends BrowserTestBase {
   /**
    * {@inheritdoc}
    */
-  protected function setUp() {
+  protected function setUp(): void {
     parent::setUp();
     $this->adminUser = $this->drupalCreateUser([
       'administer content types',
       'administer node fields',
       'administer node display',
+      'bypass node access',
     ]);
     $this->drupalLogin($this->adminUser);
     // Breadcrumb is required for FieldUiTestTrait::fieldUIAddNewField.
@@ -119,7 +120,8 @@ public function testWidget() {
       'field_' . $field_name . '[1][uri]' => '<front>',
       'field_' . $field_name . '[1][options][attributes][class]' => 'class-three class-four',
     ];
-    $this->drupalPostForm($add_path, $edit, 'Save');
+    $this->drupalGet($add_path);
+    $this->submitForm($edit, 'Save');
     $node = $this->drupalGetNodeByTitle($edit['title[0][value]']);
 
     // Load the field values.
@@ -177,7 +179,7 @@ public function testWidgetWithoutAttributes() {
       'field_' . $field_name . '[0][title]' => 'Link One',
       'field_' . $field_name . '[0][uri]' => '<front>',
     ];
-    $this->drupalPostForm($add_path, $edit, 'Save');
+    $this->submitForm($edit, 'Save');
     $node = $this->drupalGetNodeByTitle($edit['title[0][value]']);
     $this->drupalGet($node->toUrl()->toString());
     $web_assert->linkExists('Link One');
diff --git a/web/modules/link_attributes/tests/src/Functional/LinkAttributesMenuTest.php b/web/modules/link_attributes/tests/src/Functional/LinkAttributesMenuTest.php
index 4c2bf361b6..c8dda1959e 100644
--- a/web/modules/link_attributes/tests/src/Functional/LinkAttributesMenuTest.php
+++ b/web/modules/link_attributes/tests/src/Functional/LinkAttributesMenuTest.php
@@ -18,7 +18,7 @@ class LinkAttributesMenuTest extends BrowserTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'link_attributes',
     'menu_ui',
     'menu_link_content',
@@ -33,7 +33,7 @@ class LinkAttributesMenuTest extends BrowserTestBase {
   /**
    * {@inheritdoc}
    */
-  protected function setUp() {
+  protected function setUp(): void {
     parent::setUp();
     $this->placeBlock('system_menu_block:footer');
   }
@@ -65,6 +65,7 @@ public function testMenuLinkAdmin() {
 
     // Load the menu link, make sure that the classes were stored as an array.
     $id = \Drupal::entityQuery('menu_link_content')
+      ->accessCheck(FALSE)
       ->condition('title', 'A menu link')
       ->execute();
 
diff --git a/web/modules/link_attributes/tests/src/Kernel/InfoAlterTest.php b/web/modules/link_attributes/tests/src/Kernel/InfoAlterTest.php
index eadea4028d..1f784f226b 100644
--- a/web/modules/link_attributes/tests/src/Kernel/InfoAlterTest.php
+++ b/web/modules/link_attributes/tests/src/Kernel/InfoAlterTest.php
@@ -14,7 +14,7 @@ class InfoAlterTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = [
+  protected static $modules = [
     'system',
     'link_attributes',
     'link_attributes_test_alterinfo',
@@ -30,14 +30,14 @@ public function testLinkAttributesManagerInfoAlter() {
     /** @var \Drupal\link_attributes\LinkAttributesManager $linkAttributesManager */
     $linkAttributesManager = $this->container->get('plugin.manager.link_attributes');
     $definition = $linkAttributesManager->getDefinitions();
-    $this->assertTrue($definition['class']['type'] == 'textfield', 'Without altering the plugin definition the class attribute is a textfield.');
+    $this->assertEquals('textfield', $definition['class']['type'], 'Without altering the plugin definition the class attribute is a textfield.');
 
     // Set our flag to alter the plugin definition in
     // link_attributes_test_alterinfo module.
     \Drupal::state()->set('link_attributes_test_alterinfo.hook_link_attributes_plugin_alter', TRUE);
     $linkAttributesManager->clearCachedDefinitions();
     $definition = $linkAttributesManager->getDefinitions();
-    $this->assertTrue($definition['class']['type'] == 'select', 'After altering the plugin definition the class attribute is a select.');
+    $this->assertEquals('select', $definition['class']['type'], 'After altering the plugin definition the class attribute is a select.');
     $this->assertArrayHasKey('button', $definition['class']['options']);
   }
 
-- 
GitLab