From abee8af7886de6eb7c76a30fd31fa8f978476d6d Mon Sep 17 00:00:00 2001
From: lazysoundsystem <andyfootner@netscape.net>
Date: Thu, 23 Jan 2025 11:21:32 +0100
Subject: [PATCH] updates: remove amazon_ses patches and run updates

Refs: OPS-11278
---
 PATCHES/3416368-error-not-caught-extra.patch |  17 ---
 PATCHES/3416368-error-not-caught-queue.patch |  18 ---
 PATCHES/3416368-error-not-caught.patch       |  90 ---------------
 composer.lock                                | 114 +++++++++----------
 composer.patches.json                        |   5 -
 5 files changed, 57 insertions(+), 187 deletions(-)
 delete mode 100644 PATCHES/3416368-error-not-caught-extra.patch
 delete mode 100644 PATCHES/3416368-error-not-caught-queue.patch
 delete mode 100644 PATCHES/3416368-error-not-caught.patch

diff --git a/PATCHES/3416368-error-not-caught-extra.patch b/PATCHES/3416368-error-not-caught-extra.patch
deleted file mode 100644
index 2d191a2e..00000000
--- a/PATCHES/3416368-error-not-caught-extra.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-diff --git a/src/AmazonSesHandler.php b/src/AmazonSesHandler.php
-index 28342d8..103829c 100644
---- a/src/AmazonSesHandler.php
-+++ b/src/AmazonSesHandler.php
-@@ -126,6 +126,12 @@ class AmazonSesHandler implements AmazonSesHandlerInterface {
-    */
-   protected function getSleepTime() {
-     $results = $this->getSendQuota();
-+
-+    // Avoid a division by zero if the quota call failed.
-+    if (empty($results)) {
-+      return 0;
-+    }
-+
-     $per_second = ceil(1000000 / $results['MaxSendRate']);
- 
-     return intval($per_second);
diff --git a/PATCHES/3416368-error-not-caught-queue.patch b/PATCHES/3416368-error-not-caught-queue.patch
deleted file mode 100644
index 257546a5..00000000
--- a/PATCHES/3416368-error-not-caught-queue.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-diff --git a/src/Plugin/QueueWorker/AmazonSesMailQueue.php b/src/Plugin/QueueWorker/AmazonSesMailQueue.php
-index dc41050..fdc7af3 100644
---- a/src/Plugin/QueueWorker/AmazonSesMailQueue.php
-+++ b/src/Plugin/QueueWorker/AmazonSesMailQueue.php
-@@ -29,7 +29,12 @@ class AmazonSesMailQueue extends QueueWorkerBase implements ContainerFactoryPlug
-       $plugin_definition
-     );
- 
--    $instance->setHandler($container->get('amazon_ses.handler'));
-+    // Only set the handler if queueing is enabled to avoid an error when
-+    // trying to run without config.
-+    $enabled = \Drupal::config('amazon_ses.settings')->get('queue');
-+    if ($enabled) {
-+      $instance->setHandler($container->get('amazon_ses.handler'));
-+    }
- 
-     return $instance;
-   }
diff --git a/PATCHES/3416368-error-not-caught.patch b/PATCHES/3416368-error-not-caught.patch
deleted file mode 100644
index ebd16fa8..00000000
--- a/PATCHES/3416368-error-not-caught.patch
+++ /dev/null
@@ -1,90 +0,0 @@
-diff --git a/src/AmazonSesHandler.php b/src/AmazonSesHandler.php
-index ed8882c..cb2fb01 100644
---- a/src/AmazonSesHandler.php
-+++ b/src/AmazonSesHandler.php
-@@ -194,9 +194,16 @@ class AmazonSesHandler implements AmazonSesHandlerInterface {
-    * {@inheritdoc}
-    */
-   public function getSendQuota() {
--    $result = $this->client->getAccount();
-+    $quota = [];
- 
--    return array_map('number_format', $result['SendQuota']);
-+    try {
-+      $result = $this->client->getAccount();
-+      $quota = array_map('number_format', $result['SendQuota']);
-+    } catch (SesV2Exception $e) {
-+      $this->logger->error($e->getMessage());
-+      $this->messenger->addError($this->t('Unable to retrieve quota.'));
-+    }
-+    return $quota;
-   }
- 
-   /**
-diff --git a/src/Controller/AmazonSesController.php b/src/Controller/AmazonSesController.php
-index 541838c..831d38d 100644
---- a/src/Controller/AmazonSesController.php
-+++ b/src/Controller/AmazonSesController.php
-@@ -29,33 +29,38 @@ class AmazonSesController extends ControllerBase {
-    *   A render array to build the page.
-    */
-   public function statistics() {
-+    $statistics = [];
-+
-     if (!$this->verifyClient()) {
--      return [];
-+      return $statistics;
-     }
- 
--    $quota = $this->handler->getSendQuota();
--
--    return [
--      'quota' => [
--        '#type' => 'details',
--        '#title' => $this->t('Daily sending limits'),
--        '#open' => TRUE,
--        'sending_quota' => [
--          '#markup' => $this->t('<strong>Quota:</strong> @max_send', [
--            '@max_send' => $quota['Max24HourSend'],
--          ]) . '<br />',
--        ],
--        'sent_mail' => [
--          '#markup' => $this->t('<strong>Sent:</strong> @sent_last', [
--            '@sent_last' => $quota['SentLast24Hours'],
--          ]) . '<br />',
--        ],
--        'send_rate' => [
--          '#markup' => $this->t('<strong>Maximum Send Rate:</strong> @send_rate
--            emails/second', ['@send_rate' => $quota['MaxSendRate']]),
-+    $result = $this->handler->getSendQuota();
-+
-+    if (!empty($result)) {
-+      $statistics = [
-+        'quota' => [
-+          '#type' => 'details',
-+          '#title' => $this->t('Daily sending limits'),
-+          '#open' => TRUE,
-+          'sending_quota' => [
-+            '#markup' => $this->t('<strong>Quota:</strong> @max_send', [
-+              '@max_send' => $result['Max24HourSend'],
-+            ]) . '<br />',
-+          ],
-+          'sent_mail' => [
-+              '#markup' => $this->t('<strong>Sent:</strong> @sent_last', [
-+              '@sent_last' => $result['SentLast24Hours'],
-+            ]) . '<br />',
-+          ],
-+          'send_rate' => [
-+            '#markup' => $this->t('<strong>Maximum Send Rate:</strong> @send_rate
-+            emails/second', ['@send_rate' => $result['MaxSendRate']]),
-+          ],
-         ],
--      ],
--    ];
--  }
-+      ];
-+    }
- 
-+    return $statistics;
-+  }
- }
diff --git a/composer.lock b/composer.lock
index c4eeec52..ebe233e4 100644
--- a/composer.lock
+++ b/composer.lock
@@ -118,16 +118,16 @@
         },
         {
             "name": "aws/aws-sdk-php",
-            "version": "3.337.0",
+            "version": "3.338.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/aws/aws-sdk-php.git",
-                "reference": "7e40cecb3ce66749bbd5eaa9f370de48c16acd6c"
+                "reference": "b456832a41f4638ad8d117cedd6efaed4017e651"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/7e40cecb3ce66749bbd5eaa9f370de48c16acd6c",
-                "reference": "7e40cecb3ce66749bbd5eaa9f370de48c16acd6c",
+                "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/b456832a41f4638ad8d117cedd6efaed4017e651",
+                "reference": "b456832a41f4638ad8d117cedd6efaed4017e651",
                 "shasum": ""
             },
             "require": {
@@ -135,31 +135,31 @@
                 "ext-json": "*",
                 "ext-pcre": "*",
                 "ext-simplexml": "*",
-                "guzzlehttp/guzzle": "^6.5.8 || ^7.4.5",
-                "guzzlehttp/promises": "^1.4.0 || ^2.0",
-                "guzzlehttp/psr7": "^1.9.1 || ^2.4.5",
-                "mtdowling/jmespath.php": "^2.6",
-                "php": ">=7.2.5",
-                "psr/http-message": "^1.0 || ^2.0"
+                "guzzlehttp/guzzle": "^7.4.5",
+                "guzzlehttp/promises": "^2.0",
+                "guzzlehttp/psr7": "^2.4.5",
+                "mtdowling/jmespath.php": "^2.8.0",
+                "php": ">=8.1",
+                "psr/http-message": "^2.0"
             },
             "require-dev": {
                 "andrewsville/php-token-reflection": "^1.4",
                 "aws/aws-php-sns-message-validator": "~1.0",
                 "behat/behat": "~3.0",
-                "composer/composer": "^1.10.22",
+                "composer/composer": "^2.7.8",
                 "dms/phpunit-arraysubset-asserts": "^0.4.0",
                 "doctrine/cache": "~1.4",
                 "ext-dom": "*",
                 "ext-openssl": "*",
                 "ext-pcntl": "*",
                 "ext-sockets": "*",
-                "nette/neon": "^2.3",
                 "paragonie/random_compat": ">= 2",
                 "phpunit/phpunit": "^5.6.3 || ^8.5 || ^9.5",
-                "psr/cache": "^1.0 || ^2.0 || ^3.0",
-                "psr/simple-cache": "^1.0 || ^2.0 || ^3.0",
-                "sebastian/comparator": "^1.2.3 || ^4.0",
-                "yoast/phpunit-polyfills": "^1.0"
+                "psr/cache": "^2.0 || ^3.0",
+                "psr/simple-cache": "^2.0 || ^3.0",
+                "sebastian/comparator": "^1.2.3 || ^4.0 || ^5.0",
+                "symfony/filesystem": "^v6.4.0 || ^v7.1.0",
+                "yoast/phpunit-polyfills": "^2.0"
             },
             "suggest": {
                 "aws/aws-php-sns-message-validator": "To validate incoming SNS notifications",
@@ -208,11 +208,11 @@
                 "sdk"
             ],
             "support": {
-                "forum": "https://forums.aws.amazon.com/forum.jspa?forumID=80",
+                "forum": "https://github.com/aws/aws-sdk-php/discussions",
                 "issues": "https://github.com/aws/aws-sdk-php/issues",
-                "source": "https://github.com/aws/aws-sdk-php/tree/3.337.0"
+                "source": "https://github.com/aws/aws-sdk-php/tree/3.338.0"
             },
-            "time": "2025-01-15T19:58:52+00:00"
+            "time": "2025-01-22T19:15:24+00:00"
         },
         {
             "name": "chi-teck/drupal-code-generator",
@@ -1602,28 +1602,28 @@
         },
         {
             "name": "drupal/amazon_ses",
-            "version": "3.0.1",
+            "version": "3.1.0",
             "source": {
                 "type": "git",
                 "url": "https://git.drupalcode.org/project/amazon_ses.git",
-                "reference": "3.0.1"
+                "reference": "3.1.0"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://ftp.drupal.org/files/projects/amazon_ses-3.0.1.zip",
-                "reference": "3.0.1",
-                "shasum": "2dbb10219056e21f0bb60d37df5b459caea635e2"
+                "url": "https://ftp.drupal.org/files/projects/amazon_ses-3.1.0.zip",
+                "reference": "3.1.0",
+                "shasum": "0a598eee62c85d7ee8cbb55ad43ce00ece217bae"
             },
             "require": {
                 "aws/aws-sdk-php": "^3.54",
                 "drupal/aws": "^2.0",
-                "drupal/core": "^9.1 || ^10"
+                "drupal/core": "^9.1 || ^10 || ^11"
             },
             "type": "drupal-module",
             "extra": {
                 "drupal": {
-                    "version": "3.0.1",
-                    "datestamp": "1671308264",
+                    "version": "3.1.0",
+                    "datestamp": "1737386574",
                     "security-coverage": {
                         "status": "covered",
                         "message": "Covered by Drupal's security advisory policy"
@@ -3366,17 +3366,17 @@
         },
         {
             "name": "drupal/ds",
-            "version": "3.27.0",
+            "version": "3.28.0",
             "source": {
                 "type": "git",
                 "url": "https://git.drupalcode.org/project/ds.git",
-                "reference": "8.x-3.27"
+                "reference": "8.x-3.28"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://ftp.drupal.org/files/projects/ds-8.x-3.27.zip",
-                "reference": "8.x-3.27",
-                "shasum": "fc600411cb3594c65b23737adf7431f58a20e58f"
+                "url": "https://ftp.drupal.org/files/projects/ds-8.x-3.28.zip",
+                "reference": "8.x-3.28",
+                "shasum": "11d0cf2306639063fc52f7f8990bfae91da69cd1"
             },
             "require": {
                 "drupal/core": "^10.2 || ^11"
@@ -3388,8 +3388,8 @@
             "type": "drupal-module",
             "extra": {
                 "drupal": {
-                    "version": "8.x-3.27",
-                    "datestamp": "1736964409",
+                    "version": "8.x-3.28",
+                    "datestamp": "1737118066",
                     "security-coverage": {
                         "status": "covered",
                         "message": "Covered by Drupal's security advisory policy"
@@ -5883,17 +5883,17 @@
         },
         {
             "name": "drupal/redirect",
-            "version": "1.10.0",
+            "version": "1.11.0",
             "source": {
                 "type": "git",
                 "url": "https://git.drupalcode.org/project/redirect.git",
-                "reference": "8.x-1.10"
+                "reference": "8.x-1.11"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://ftp.drupal.org/files/projects/redirect-8.x-1.10.zip",
-                "reference": "8.x-1.10",
-                "shasum": "9d72d7e0717dbdea3ab3306c5d6840da5bd3024c"
+                "url": "https://ftp.drupal.org/files/projects/redirect-8.x-1.11.zip",
+                "reference": "8.x-1.11",
+                "shasum": "7df8b3524bbde07d254216039636947a689140ef"
             },
             "require": {
                 "drupal/core": "^9.2 || ^10 || ^11"
@@ -5901,8 +5901,8 @@
             "type": "drupal-module",
             "extra": {
                 "drupal": {
-                    "version": "8.x-1.10",
-                    "datestamp": "1723277641",
+                    "version": "8.x-1.11",
+                    "datestamp": "1737382886",
                     "security-coverage": {
                         "status": "covered",
                         "message": "Covered by Drupal's security advisory policy"
@@ -13326,16 +13326,16 @@
         },
         {
             "name": "composer/composer",
-            "version": "2.8.4",
+            "version": "2.8.5",
             "source": {
                 "type": "git",
                 "url": "https://github.com/composer/composer.git",
-                "reference": "112e37d1dca22b3fdb81cf3524ab4994f47fdb8c"
+                "reference": "ae208dc1e182bd45d99fcecb956501da212454a1"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/composer/composer/zipball/112e37d1dca22b3fdb81cf3524ab4994f47fdb8c",
-                "reference": "112e37d1dca22b3fdb81cf3524ab4994f47fdb8c",
+                "url": "https://api.github.com/repos/composer/composer/zipball/ae208dc1e182bd45d99fcecb956501da212454a1",
+                "reference": "ae208dc1e182bd45d99fcecb956501da212454a1",
                 "shasum": ""
             },
             "require": {
@@ -13420,7 +13420,7 @@
                 "irc": "ircs://irc.libera.chat:6697/composer",
                 "issues": "https://github.com/composer/composer/issues",
                 "security": "https://github.com/composer/composer/security/policy",
-                "source": "https://github.com/composer/composer/tree/2.8.4"
+                "source": "https://github.com/composer/composer/tree/2.8.5"
             },
             "funding": [
                 {
@@ -13436,7 +13436,7 @@
                     "type": "tidelift"
                 }
             ],
-            "time": "2024-12-11T10:57:47+00:00"
+            "time": "2025-01-21T14:23:40+00:00"
         },
         {
             "name": "composer/metadata-minifier",
@@ -13922,16 +13922,16 @@
         },
         {
             "name": "drupal/coder",
-            "version": "8.3.27",
+            "version": "8.3.28",
             "source": {
                 "type": "git",
                 "url": "https://github.com/pfrenssen/coder.git",
-                "reference": "04a4563b82c419e43cc58393a78b21c44fcc29e2"
+                "reference": "d18eeb133f7da766f0341734aa983d05f2b317fd"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/pfrenssen/coder/zipball/04a4563b82c419e43cc58393a78b21c44fcc29e2",
-                "reference": "04a4563b82c419e43cc58393a78b21c44fcc29e2",
+                "url": "https://api.github.com/repos/pfrenssen/coder/zipball/d18eeb133f7da766f0341734aa983d05f2b317fd",
+                "reference": "d18eeb133f7da766f0341734aa983d05f2b317fd",
                 "shasum": ""
             },
             "require": {
@@ -13969,7 +13969,7 @@
                 "issues": "https://www.drupal.org/project/issues/coder",
                 "source": "https://www.drupal.org/project/coder"
             },
-            "time": "2025-01-06T09:46:24+00:00"
+            "time": "2025-01-18T17:05:53+00:00"
         },
         {
             "name": "drupal/core-dev",
@@ -16041,16 +16041,16 @@
         },
         {
             "name": "phpstan/phpstan",
-            "version": "1.12.15",
+            "version": "1.12.16",
             "source": {
                 "type": "git",
                 "url": "https://github.com/phpstan/phpstan.git",
-                "reference": "c91d4e8bc056f46cf653656e6f71004b254574d1"
+                "reference": "e0bb5cb78545aae631220735aa706eac633a6be9"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/phpstan/phpstan/zipball/c91d4e8bc056f46cf653656e6f71004b254574d1",
-                "reference": "c91d4e8bc056f46cf653656e6f71004b254574d1",
+                "url": "https://api.github.com/repos/phpstan/phpstan/zipball/e0bb5cb78545aae631220735aa706eac633a6be9",
+                "reference": "e0bb5cb78545aae631220735aa706eac633a6be9",
                 "shasum": ""
             },
             "require": {
@@ -16095,7 +16095,7 @@
                     "type": "github"
                 }
             ],
-            "time": "2025-01-05T16:40:22+00:00"
+            "time": "2025-01-21T14:50:05+00:00"
         },
         {
             "name": "phpstan/phpstan-deprecation-rules",
diff --git a/composer.patches.json b/composer.patches.json
index c3f735cf..9e9a3fa9 100644
--- a/composer.patches.json
+++ b/composer.patches.json
@@ -4,11 +4,6 @@
             "Design Issue": "PATCHES/anchorlink/anchor_link-Integration-with-LinkIt-2958532.patch",
             "CSS dialog Design Issue": "PATCHES/anchorlink/anchor_link-styling_issue_in_link_dialog-2986268-11.patch"
         },
-        "drupal/amazon_ses": {
-          "Error not caught when AWS API returns 403": "PATCHES/3416368-error-not-caught.patch",
-          "Error not caught when AWS API returns 403 extra backport": "PATCHES/3416368-error-not-caught-extra.patch",
-          "Error not caught when AWS API returns 403 extra queue fix": "PATCHES/3416368-error-not-caught-queue.patch"
-        },
         "drupal/core": {
             "Warning": "PATCHES/core/CoreError.patch",
             "https://www.drupal.org/project/drupal/issues/3143617": "https://www.drupal.org/files/issues/2020-07-07/3143617-28_0.patch"