From 75d5f961dfd79aa9d857bed0fc5d365b223d9b95 Mon Sep 17 00:00:00 2001
From: "lee.5151" <lee.5151@osu.edu>
Date: Mon, 21 Nov 2022 12:16:18 -0500
Subject: [PATCH] Upgrading drupal/ultimate_cron (2.0.0-alpha5 => 2.0.0-alpha6)

---
 composer.lock                                 |  18 +--
 vendor/composer/installed.json                |  36 +++---
 vendor/composer/installed.php                 |  10 +-
 web/modules/ultimate_cron/composer.json       |   4 +-
 .../src/Commands/UltimateCronCommands.php     |   7 --
 .../ultimate_cron/src/CronJobDiscovery.php    |   8 +-
 .../ultimate_cron/src/CronJobListBuilder.php  |   6 +-
 .../ultimate_cron/src/CronPluginMultiple.php  |   2 +-
 .../ultimate_cron/src/Entity/CronJob.php      |   8 +-
 .../src/Form/SchedulerSettingsForm.php        |   2 +-
 .../src/Launcher/LauncherBase.php             |   4 +-
 .../src/Logger/WatchdogLogger.php             |   2 +-
 .../ultimate_cron/Logger/CacheLogger.php      |   2 +-
 .../ultimate_cron/Scheduler/Crontab.php       |   6 +-
 web/modules/ultimate_cron/src/QueueWorker.php |  13 +++
 .../ultimate_cron/src/TaggedSettings.php      |   2 +-
 .../tests/src/Functional/CronJobFormTest.php  | 107 +++++++++---------
 .../src/Functional/CronJobInstallTest.php     |  24 ++--
 .../tests/src/Functional/LoggerWebTest.php    |  20 ++--
 .../tests/src/Kernel/CronJobKernelTest.php    |   2 +-
 .../tests/src/Kernel/CronJobTest.php          |   2 +-
 .../src/Kernel/UltimateCronQueueTest.php      |  13 ++-
 .../ultimate_cron_logger_test.info.yml        |   9 +-
 .../ultimate_cron/ultimate_cron.api.php       |   2 +-
 .../ultimate_cron/ultimate_cron.info.yml      |   8 +-
 .../ultimate_cron/ultimate_cron.module        |   8 +-
 26 files changed, 177 insertions(+), 148 deletions(-)

diff --git a/composer.lock b/composer.lock
index 026b86ab08..a303f64d6f 100644
--- a/composer.lock
+++ b/composer.lock
@@ -7483,26 +7483,26 @@
         },
         {
             "name": "drupal/ultimate_cron",
-            "version": "2.0.0-alpha5",
+            "version": "2.0.0-alpha6",
             "source": {
                 "type": "git",
                 "url": "https://git.drupalcode.org/project/ultimate_cron.git",
-                "reference": "8.x-2.0-alpha5"
+                "reference": "8.x-2.0-alpha6"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://ftp.drupal.org/files/projects/ultimate_cron-8.x-2.0-alpha5.zip",
-                "reference": "8.x-2.0-alpha5",
-                "shasum": "0f10464fff29eca89024e7afa5b6d8d07bd52f75"
+                "url": "https://ftp.drupal.org/files/projects/ultimate_cron-8.x-2.0-alpha6.zip",
+                "reference": "8.x-2.0-alpha6",
+                "shasum": "42ab6df8e94a9b3772876a378062534552a32826"
             },
             "require": {
-                "drupal/core": "^8.7.7 || ^9"
+                "drupal/core": "^9 || ^10"
             },
             "type": "drupal-module",
             "extra": {
                 "drupal": {
-                    "version": "8.x-2.0-alpha5",
-                    "datestamp": "1600928948",
+                    "version": "8.x-2.0-alpha6",
+                    "datestamp": "1666471448",
                     "security-coverage": {
                         "status": "not-covered",
                         "message": "Alpha releases are not covered by Drupal security advisories."
@@ -7510,7 +7510,7 @@
                 },
                 "drush": {
                     "services": {
-                        "drush.services.yml": "^9 || ^10"
+                        "drush.services.yml": "^9 || ^10 || ^11"
                     }
                 }
             },
diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json
index c91c38182e..cc999e8ad8 100644
--- a/vendor/composer/installed.json
+++ b/vendor/composer/installed.json
@@ -7764,27 +7764,27 @@
         },
         {
             "name": "drupal/ultimate_cron",
-            "version": "2.0.0-alpha5",
-            "version_normalized": "2.0.0.0-alpha5",
+            "version": "2.0.0-alpha6",
+            "version_normalized": "2.0.0.0-alpha6",
             "source": {
                 "type": "git",
                 "url": "https://git.drupalcode.org/project/ultimate_cron.git",
-                "reference": "8.x-2.0-alpha5"
+                "reference": "8.x-2.0-alpha6"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://ftp.drupal.org/files/projects/ultimate_cron-8.x-2.0-alpha5.zip",
-                "reference": "8.x-2.0-alpha5",
-                "shasum": "0f10464fff29eca89024e7afa5b6d8d07bd52f75"
+                "url": "https://ftp.drupal.org/files/projects/ultimate_cron-8.x-2.0-alpha6.zip",
+                "reference": "8.x-2.0-alpha6",
+                "shasum": "42ab6df8e94a9b3772876a378062534552a32826"
             },
             "require": {
-                "drupal/core": "^8.7.7 || ^9"
+                "drupal/core": "^9 || ^10"
             },
             "type": "drupal-module",
             "extra": {
                 "drupal": {
-                    "version": "8.x-2.0-alpha5",
-                    "datestamp": "1600928948",
+                    "version": "8.x-2.0-alpha6",
+                    "datestamp": "1666471448",
                     "security-coverage": {
                         "status": "not-covered",
                         "message": "Alpha releases are not covered by Drupal security advisories."
@@ -7792,7 +7792,7 @@
                 },
                 "drush": {
                     "services": {
-                        "drush.services.yml": "^9 || ^10"
+                        "drush.services.yml": "^9 || ^10 || ^11"
                     }
                 }
             },
@@ -7802,6 +7802,10 @@
                 "GPL-2.0+"
             ],
             "authors": [
+                {
+                    "name": "arnested",
+                    "homepage": "https://www.drupal.org/user/245635"
+                },
                 {
                     "name": "Berdir",
                     "homepage": "https://www.drupal.org/user/214652"
@@ -7810,14 +7814,6 @@
                     "name": "Dane Powell",
                     "homepage": "https://www.drupal.org/user/339326"
                 },
-                {
-                    "name": "Primsi",
-                    "homepage": "https://www.drupal.org/user/282629"
-                },
-                {
-                    "name": "arnested",
-                    "homepage": "https://www.drupal.org/user/245635"
-                },
                 {
                     "name": "gielfeldt",
                     "homepage": "https://www.drupal.org/user/366993"
@@ -7825,6 +7821,10 @@
                 {
                     "name": "miro_dietiker",
                     "homepage": "https://www.drupal.org/user/227761"
+                },
+                {
+                    "name": "Primsi",
+                    "homepage": "https://www.drupal.org/user/282629"
                 }
             ],
             "description": "Ultimate cron",
diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php
index dff8f16fe4..92f10e607d 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' => '2475984787276b11778650ebbcd6963d3ed140b6',
+        'reference' => 'f708cde51271cc92aa33da1cf90b333b9ab06e6d',
         'type' => 'project',
         'install_path' => __DIR__ . '/../../',
         'aliases' => array(),
@@ -1262,9 +1262,9 @@
             'dev_requirement' => false,
         ),
         'drupal/ultimate_cron' => array(
-            'pretty_version' => '2.0.0-alpha5',
-            'version' => '2.0.0.0-alpha5',
-            'reference' => '8.x-2.0-alpha5',
+            'pretty_version' => '2.0.0-alpha6',
+            'version' => '2.0.0.0-alpha6',
+            'reference' => '8.x-2.0-alpha6',
             'type' => 'drupal-module',
             'install_path' => __DIR__ . '/../../web/modules/ultimate_cron',
             'aliases' => array(),
@@ -1594,7 +1594,7 @@
         'osu-asc-webservices/d8-upstream' => array(
             'pretty_version' => 'dev-master',
             'version' => 'dev-master',
-            'reference' => '2475984787276b11778650ebbcd6963d3ed140b6',
+            'reference' => 'f708cde51271cc92aa33da1cf90b333b9ab06e6d',
             'type' => 'project',
             'install_path' => __DIR__ . '/../../',
             'aliases' => array(),
diff --git a/web/modules/ultimate_cron/composer.json b/web/modules/ultimate_cron/composer.json
index 7fc89ffd92..4e4804a947 100644
--- a/web/modules/ultimate_cron/composer.json
+++ b/web/modules/ultimate_cron/composer.json
@@ -4,12 +4,12 @@
   "license": "GPL-2.0+",
   "description": "Ultimate cron",
   "require": {
-      "drupal/core": "^8.7.7 || ^9"
+      "drupal/core": "^9 || ^10"
   },
   "extra": {
     "drush": {
       "services": {
-        "drush.services.yml": "^9 || ^10"
+        "drush.services.yml": "^9 || ^10 || ^11"
       }
     }
   }
diff --git a/web/modules/ultimate_cron/src/Commands/UltimateCronCommands.php b/web/modules/ultimate_cron/src/Commands/UltimateCronCommands.php
index 243c5c21e4..c7b17d85e0 100644
--- a/web/modules/ultimate_cron/src/Commands/UltimateCronCommands.php
+++ b/web/modules/ultimate_cron/src/Commands/UltimateCronCommands.php
@@ -15,13 +15,6 @@
  */
 class UltimateCronCommands extends DrushCommands {
 
-  /**
-   * Logger object.
-   *
-   * @var \Drupal\Core\Logger\LoggerChannelInterface
-   */
-  protected $logger;
-
   /**
    * Constructs an UltimateCronCommands object.
    *
diff --git a/web/modules/ultimate_cron/src/CronJobDiscovery.php b/web/modules/ultimate_cron/src/CronJobDiscovery.php
index 0f8a0d6a31..22e6fc7c5e 100644
--- a/web/modules/ultimate_cron/src/CronJobDiscovery.php
+++ b/web/modules/ultimate_cron/src/CronJobDiscovery.php
@@ -180,7 +180,13 @@ protected function getModuleHooks($module) {
     $items = array();
 
     // Add hook_cron() if applicable.
-    if ($this->moduleHandler->implementsHook($module, 'cron')) {
+    if (method_exists($this->moduleHandler, 'hasImplementations')) {
+      $has_implementations = $this->moduleHandler->hasImplementations('cron', $module);
+    }
+    else {
+      $has_implementations = $this->moduleHandler->implementsHook($module, 'cron');
+    }
+    if ($has_implementations) {
       $info = $this->moduleExtensionList->getExtensionInfo($module);
       $callback = "{$module}_cron";
       $items[$callback] = array(
diff --git a/web/modules/ultimate_cron/src/CronJobListBuilder.php b/web/modules/ultimate_cron/src/CronJobListBuilder.php
index e6e9c72854..95e040f8fd 100644
--- a/web/modules/ultimate_cron/src/CronJobListBuilder.php
+++ b/web/modules/ultimate_cron/src/CronJobListBuilder.php
@@ -37,8 +37,8 @@ public function buildHeader() {
    */
   public function buildRow(EntityInterface $entity) {
     /* @var \Drupal\ultimate_cron\CronJobInterface $entity */
-    $icon = drupal_get_path('module', 'ultimate_cron') . '/icons/hourglass.png';
-    $behind_icon = ['#prefix' => ' ', '#theme' => 'image', '#uri' => file_create_url($icon), '#title' => t('Job is behind schedule!')];
+    $icon = \Drupal::service('extension.list.module')->getPath('ultimate_cron') . '/icons/hourglass.png';
+    $behind_icon = ['#prefix' => ' ', '#theme' => 'image', '#uri' => \Drupal::service('file_url_generator')->generateAbsoluteString($icon), '#title' => t('Job is behind schedule!')];
 
     $log_entry = $entity->loadLatestLogEntry();
     $row['label'] = $entity->label();
@@ -49,7 +49,7 @@ public function buildRow(EntityInterface $entity) {
       $row['scheduled']['behind'] = $behind_icon;
     }
     // If the start time is 0, the jobs have never been run.
-    $row['started']['#markup'] = $log_entry->start_time ? \Drupal::service('date.formatter')->format($log_entry->start_time, "short") : $this->t('Never');
+    $row['started']['#markup'] = $log_entry->start_time ? \Drupal::service('date.formatter')->format((int) $log_entry->start_time, "short") : $this->t('Never');
 
     // Display duration
     $progress = $entity->isLocked() ? $entity->formatProgress() : '';
diff --git a/web/modules/ultimate_cron/src/CronPluginMultiple.php b/web/modules/ultimate_cron/src/CronPluginMultiple.php
index ca8f9d5955..c94a8f89c2 100644
--- a/web/modules/ultimate_cron/src/CronPluginMultiple.php
+++ b/web/modules/ultimate_cron/src/CronPluginMultiple.php
@@ -2,7 +2,7 @@
 
 namespace Drupal\ultimate_cron;
 
-class CronPluginMultiple extends \Drupal\ultimate_cron\CronPlugin {
+class CronPluginMultiple extends CronPlugin {
   static public $multiple = TRUE;
 
   /**
diff --git a/web/modules/ultimate_cron/src/Entity/CronJob.php b/web/modules/ultimate_cron/src/Entity/CronJob.php
index 837e8775d3..735f1167e0 100644
--- a/web/modules/ultimate_cron/src/Entity/CronJob.php
+++ b/web/modules/ultimate_cron/src/Entity/CronJob.php
@@ -477,13 +477,17 @@ public function run($init_message = NULL) {
       // explicitly here instead. The advantage is that this will not
       // interrupt the process.
       $variables = Error::decodeException($e);
-      unset($variables['backtrace']);
+      $variables = array_filter($variables, function ($key) {
+        return $key[0] == '@' || $key[0] == '%';
+      }, ARRAY_FILTER_USE_KEY);
       $log_entry->log('%type: @message in %function (line %line of %file).', $variables, RfcLogLevel::ERROR);
       return FALSE;
     }
     catch (\Exception $e) {
       $variables = Error::decodeException($e);
-      unset($variables['backtrace']);
+      $variables = array_filter($variables, function ($key) {
+        return $key[0] == '@' || $key[0] == '%';
+      }, ARRAY_FILTER_USE_KEY);
       $log_entry->log('%type: @message in %function (line %line of %file).', $variables, RfcLogLevel::ERROR);
       return FALSE;
     }
diff --git a/web/modules/ultimate_cron/src/Form/SchedulerSettingsForm.php b/web/modules/ultimate_cron/src/Form/SchedulerSettingsForm.php
index c9bdc716b7..e4e5053aad 100644
--- a/web/modules/ultimate_cron/src/Form/SchedulerSettingsForm.php
+++ b/web/modules/ultimate_cron/src/Form/SchedulerSettingsForm.php
@@ -69,7 +69,7 @@ public function buildForm(array $form, FormStateInterface $form_state) {
       '#collapsed' => TRUE,
     );
     $form['crontab']['rules_help']['info'] = array(
-      '#markup' => file_get_contents(drupal_get_path('module', 'ultimate_cron') . '/help/rules.html'),
+      '#markup' => file_get_contents(\Drupal::service('extension.list.module')->getPath('ultimate_cron') . '/help/rules.html'),
     );
 
     // Settings for Simple scheduler.
diff --git a/web/modules/ultimate_cron/src/Launcher/LauncherBase.php b/web/modules/ultimate_cron/src/Launcher/LauncherBase.php
index f83f695f06..743570ed9e 100644
--- a/web/modules/ultimate_cron/src/Launcher/LauncherBase.php
+++ b/web/modules/ultimate_cron/src/Launcher/LauncherBase.php
@@ -67,7 +67,7 @@ public function launchJobs(array $jobs) {
    * {@inheritdoc}
    */
   public function formatRunning(CronJobInterface $job) {
-    $file = drupal_get_path('module', 'ultimate_cron') . '/icons/hourglass.png';
+    $file = \Drupal::service('extension.list.module')->getPath('ultimate_cron') . '/icons/hourglass.png';
     $status = ['#theme' => 'image', '#uri' => $file];
     $title = t('running');
     return array($status, $title);
@@ -77,7 +77,7 @@ public function formatRunning(CronJobInterface $job) {
    * {@inheritdoc}
    */
   public function formatUnfinished(CronJobInterface $job) {
-    $file = drupal_get_path('module', 'ultimate_cron') . '/icons/lock_open.png';
+    $file = \Drupal::service('extension.list.module')->getPath('ultimate_cron') . '/icons/lock_open.png';
     $status = ['#theme' => 'image', '#uri' => $file];
     $title = t('unfinished but not locked?');
     return array($status, $title);
diff --git a/web/modules/ultimate_cron/src/Logger/WatchdogLogger.php b/web/modules/ultimate_cron/src/Logger/WatchdogLogger.php
index 56d69ec37e..381c551dcb 100644
--- a/web/modules/ultimate_cron/src/Logger/WatchdogLogger.php
+++ b/web/modules/ultimate_cron/src/Logger/WatchdogLogger.php
@@ -49,7 +49,7 @@ public function __construct(LogMessageParserInterface $parser) {
   /**
    * {@inheritdoc}
    */
-  public function log($level, $message, array $context = array()) {
+  public function log($level, $message, array $context = array()): void {
 
     if ($this->logEntries) {
 
diff --git a/web/modules/ultimate_cron/src/Plugin/ultimate_cron/Logger/CacheLogger.php b/web/modules/ultimate_cron/src/Plugin/ultimate_cron/Logger/CacheLogger.php
index a97070c223..4a7b304cca 100644
--- a/web/modules/ultimate_cron/src/Plugin/ultimate_cron/Logger/CacheLogger.php
+++ b/web/modules/ultimate_cron/src/Plugin/ultimate_cron/Logger/CacheLogger.php
@@ -116,7 +116,7 @@ public function save(LogEntry $log_entry) {
 
     $settings = $this->getConfiguration();
 
-    $expire = $settings['timeout'] != Cache::PERMANENT ? REQUEST_TIME + $settings['timeout'] : $settings['timeout'];
+    $expire = $settings['timeout'] != Cache::PERMANENT ? \Drupal::time()->getRequestTime() + $settings['timeout'] : $settings['timeout'];
 
     $this->cache->set('uc-name:' . $log_entry->name, $log_entry->lid, $expire);
     $this->cache->set('uc-lid:' . $log_entry->lid, $log_entry->getData(), $expire);
diff --git a/web/modules/ultimate_cron/src/Plugin/ultimate_cron/Scheduler/Crontab.php b/web/modules/ultimate_cron/src/Plugin/ultimate_cron/Scheduler/Crontab.php
index 1795ad55a8..7592b1b45a 100644
--- a/web/modules/ultimate_cron/src/Plugin/ultimate_cron/Scheduler/Crontab.php
+++ b/web/modules/ultimate_cron/src/Plugin/ultimate_cron/Scheduler/Crontab.php
@@ -41,7 +41,7 @@ public function formatLabel(CronJob $job) {
   public function formatLabelVerbose(CronJob $job) {
     $parsed = '';
     $next_schedule = NULL;
-    $time = REQUEST_TIME;
+    $time = \Drupal::time()->getRequestTime();
     $skew = $this->getSkew($job);
     foreach ($this->configuration['rules'] as $rule) {
       $cron = CronRule::factory($rule, $time, $skew);
@@ -83,7 +83,7 @@ public function buildConfigurationForm(array $form, FormStateInterface $form_sta
     );
 
     $form['rules_help']['info'] = array(
-      '#markup' => file_get_contents(drupal_get_path('module', 'ultimate_cron') . '/help/rules.html'),
+      '#markup' => file_get_contents(\Drupal::service('extension.list.module')->getPath('ultimate_cron') . '/help/rules.html'),
     );
 
     $form['catch_up'] = array(
@@ -179,7 +179,7 @@ public function isBehind(CronJob $job) {
       $time = $cron->getNextSchedule();
       $next_schedule = is_null($next_schedule) || $time < $next_schedule ? $time : $next_schedule;
     }
-    $behind = REQUEST_TIME - $next_schedule;
+    $behind = \Drupal::time()->getRequestTime() - $next_schedule;
 
     return $behind > $this->configuration['catch_up'] ? $behind : FALSE;
   }
diff --git a/web/modules/ultimate_cron/src/QueueWorker.php b/web/modules/ultimate_cron/src/QueueWorker.php
index d5a819e530..a89957bfe4 100644
--- a/web/modules/ultimate_cron/src/QueueWorker.php
+++ b/web/modules/ultimate_cron/src/QueueWorker.php
@@ -7,6 +7,8 @@
 use Drupal\Core\Config\ConfigFactory;
 use Drupal\Core\Queue\RequeueException;
 use Drupal\Core\Queue\SuspendQueueException;
+use Drupal\Core\Queue\DelayableQueueInterface;
+use Drupal\Core\Queue\DelayedRequeueException;
 
 /**
  * Defines the queue worker.
@@ -114,6 +116,13 @@ public function queueCallback(CronJobInterface $job) {
         // The worker requested the task be immediately requeued.
         $queue->releaseItem($item);
       }
+      catch (DelayedRequeueException $e) {
+        if ($queue instanceof DelayableQueueInterface) {
+          // This queue can handle a custom delay; use the duration provided
+          // by the exception.
+          $queue->delayItem($item, $e->getDelay());
+        }
+      }
       catch (SuspendQueueException $e) {
         // If the worker indicates there is a problem with the whole queue,
         // release the item and skip to the next queue.
@@ -121,6 +130,10 @@ public function queueCallback(CronJobInterface $job) {
 
         watchdog_exception('cron', $e);
 
+        // Rethrow the SuspendQueueException, so that the queue is correctly
+        // suspended for the current cron run to avoid infinite loops.
+        throw $e;
+
       }
       catch (\Exception $e) {
         // In case of any other kind of exception, log it and leave the item
diff --git a/web/modules/ultimate_cron/src/TaggedSettings.php b/web/modules/ultimate_cron/src/TaggedSettings.php
index 4cae649a73..db90283575 100644
--- a/web/modules/ultimate_cron/src/TaggedSettings.php
+++ b/web/modules/ultimate_cron/src/TaggedSettings.php
@@ -15,6 +15,6 @@ class TaggedSettings extends Settings {
    * Only valid for jobs tagged with the proper tag.
    */
   public function isValid($job = NULL) {
-    return $job ? in_array($this->name, $job->hook['tags']) : \Drupal\ultimate_cron\parent::isValid();
+    return $job ? in_array($this->name, $job->hook['tags']) : parent::isValid();
   }
 }
diff --git a/web/modules/ultimate_cron/tests/src/Functional/CronJobFormTest.php b/web/modules/ultimate_cron/tests/src/Functional/CronJobFormTest.php
index 5c0d13109e..1af58f9101 100644
--- a/web/modules/ultimate_cron/tests/src/Functional/CronJobFormTest.php
+++ b/web/modules/ultimate_cron/tests/src/Functional/CronJobFormTest.php
@@ -61,16 +61,16 @@ public function testManageJob() {
 
     // Cron Jobs overview.
     $this->drupalGet('admin/config/system/cron/jobs');
-    $this->assertResponse('200');
+    $this->assertSession()->statusCodeEquals('200');
 
     // Check for the default schedule message in Job list.
-    $this->assertText('Every 15 min');
+    $this->assertSession()->pageTextContains('Every 15 min');
     // Check for the Last Run default value.
-    $this->assertText('Never');
+    $this->assertSession()->pageTextContains('Never');
 
     // Start editing added job.
     $this->drupalGet('admin/config/system/cron/jobs/manage/' . $this->jobId);
-    $this->assertResponse('200');
+    $this->assertSession()->statusCodeEquals('200');
 
     // Set new cron job configuration and save the old job name.
     $job = CronJob::load($this->jobId);
@@ -79,72 +79,74 @@ public function testManageJob() {
     $edit = array('title' => $this->jobName);
 
     // Save the new job.
-    $this->drupalPostForm(NULL, $edit, t('Save'));
+    $this->submitForm($edit, t('Save'));
     // Assert the edited Job hasn't run yet.
-    $this->assertText('Never');
+    $this->assertSession()->pageTextContains('Never');
     // Assert messenger service message for successful updated job.
-    $this->assertText(t('job @name has been updated.', array('@name' => $this->jobName)));
+    $this->assertSession()->pageTextContains(t('job @name has been updated.', array('@name' => $this->jobName)));
 
     // Run the Jobs.
     $this->cronRun();
 
     // Assert the cron jobs have been run by checking the time.
     $this->drupalGet('admin/config/system/cron/jobs');
-    $this->assertText(\Drupal::service('date.formatter')->format(\Drupal::state()->get('system.cron_last'), 'short'), 'Created Cron jobs have been run.');
+    $this->assertSession()->pageTextContains(\Drupal::service('date.formatter')->format(\Drupal::state()->get('system.cron_last'), 'short'));
 
     // Check that all jobs have been run.
-    $this->assertNoText("Never");
+    $this->assertSession()->pageTextNotContains("Never");
 
     // Assert cron job overview for recently updated job.
     $this->drupalGet('admin/config/system/cron/jobs');
-    $this->assertNoText($old_job_name);
-    $this->assertText($this->jobName);
+    $this->assertSession()->pageTextNotContains($old_job_name);
+    $this->assertSession()->pageTextContains($this->jobName);
 
     // Change time when cron runs, check the 'Scheduled' label is updated.
     $this->clickLink(t('Edit'));
-    $this->drupalPostForm(NULL, ['scheduler[configuration][rules][0]' => '0+@ */6 * * *'], t('Save'));
-    $this->assertText('Every 6 hours');
+    $this->submitForm(['scheduler[configuration][rules][0]' => '0+@ */6 * * *'], t('Save'));
+    $this->assertSession()->pageTextContains('Every 6 hours');
 
     // Test disabling a job.
     $this->clickLink(t('Disable'), 0);
-    $this->assertText('This cron job will no longer be executed.');
-    $this->drupalPostForm(NULL, NULL, t('Disable'));
+    $this->assertSession()->pageTextContains('This cron job will no longer be executed.');
+    $this->submitForm([], t('Disable'));
 
     // Assert messenger service message for successful disabled job.
-    $this->assertText(t('Disabled cron job @name.', array('@name' => $this->jobName)));
+    $this->assertSession()->pageTextContains(t('Disabled cron job @name.', array('@name' => $this->jobName)));
     $this->drupalGet('admin/config/system/cron/jobs');
-    $this->assertFieldByXPath('//table/tbody/tr[1]/td[6]', 'Disabled');
-    $this->assertFieldByXPath('//table/tbody/tr[1]/td[8]/div/div/ul/li[1]/a', 'Enable');
-    $this->assertNoFieldByXPath('//table/tbody/tr[1]/td[8]/div/div/ul/li[1]/a', 'Run');
+    $this->assertSession()->elementExists('xpath', '//table/tbody/tr[1]/td[6]');
+    $this->assertSession()->elementContains('xpath','//table/tbody/tr[1]/td[8]/div/div/ul/li[1]/a', 'Enable');
+    $this->assertSession()->elementNotContains('xpath', '//table/tbody/tr[1]/td[8]/div/div/ul/li[1]/a', 'Run');
 
     // Test enabling a job.
     $this->clickLink(t('Enable'), 0);
-    $this->assertText('This cron job will be executed again.');
-    $this->drupalPostForm(NULL, NULL, t('Enable'));
+    $this->assertSession()->pageTextContains('This cron job will be executed again.');
+    $this->submitForm([], t('Enable'));
 
     // Assert messenger service message for successful enabled job.
-    $this->assertText(t('Enabled cron job @name.', array('@name' => $this->jobName)));
+    $this->assertSession()->pageTextContains(t('Enabled cron job @name.', array('@name' => $this->jobName)));
     $this->drupalGet('admin/config/system/cron/jobs');
-    $expected_checkmark_image_url = file_url_transform_relative(file_create_url('core/misc/icons/73b355/check.svg'));
+    $expected_checkmark_image_url = \Drupal::service('file_url_generator')->generateString('core/misc/icons/73b355/check.svg');
     $this->assertEquals($expected_checkmark_image_url, $this->xpath('//table/tbody/tr[1]/td[6]/img')[0]->getAttribute('src'));
-    $this->assertFieldByXPath('//table/tbody/tr[1]/td[8]/div/div/ul/li[1]/a', 'Run');
+    $this->assertSession()->elementExists('xpath','//table/tbody/tr[1]/td[8]/div/div/ul/li[1]/a');
 
     // Test disabling a job with the checkbox on the edit page.
     $edit = array(
       'status' => FALSE,
     );
-    $this->drupalPostForm('admin/config/system/cron/jobs/manage/' . $this->jobId, $edit, t('Save'));
-    $this->assertFieldByXPath('//table/tbody/tr[1]/td[6]', 'Disabled');
-    $this->assertFieldByXPath('//table/tbody/tr[1]/td[8]/div/div/ul/li[1]/a', 'Enable');
-    $this->assertNoFieldByXPath('//table/tbody/tr[1]/td[8]/div/div/ul/li[1]/a', 'Run');
+    $this->drupalGet('admin/config/system/cron/jobs/manage/' . $this->jobId);
+    $this->submitForm($edit, t('Save'));
+    $this->assertSession()->elementExists('xpath','//table/tbody/tr[1]/td[6]');
+    $this->assertSession()->elementContains('xpath','//table/tbody/tr[1]/td[8]/div/div/ul/li[1]/a', 'Enable');
+    $this->assertSession()->elementNotContains('xpath', '//table/tbody/tr[1]/td[8]/div/div/ul/li[1]/a', 'Run');
 
     // Test enabling a job with the checkbox on the edit page.
     $edit = array(
       'status' => TRUE,
     );
-    $this->drupalPostForm('admin/config/system/cron/jobs/manage/' . $this->jobId, $edit, t('Save'));
+    $this->drupalGet('admin/config/system/cron/jobs/manage/' . $this->jobId);
+    $this->submitForm($edit, t('Save'));
     $this->assertEquals($expected_checkmark_image_url, $this->xpath('//table/tbody/tr[1]/td[6]/img')[0]->getAttribute('src'));
-    $this->assertFieldByXPath('//table/tbody/tr[1]/td[8]/div/div/ul/li[1]/a', 'Run');
+    $this->assertSession()->elementExists('xpath','//table/tbody/tr[1]/td[8]/div/div/ul/li[1]/a');
 
     $this->drupalGet('admin/config/system/cron/jobs');
 
@@ -153,18 +155,19 @@ public function testManageJob() {
     $job_configuration = array(
       'scheduler[id]' => 'crontab',
     );
-    $this->drupalPostForm(NULL, $job_configuration, t('Save'));
-    $this->drupalPostForm('admin/config/system/cron/jobs/manage/' . $this->jobId, ['scheduler[configuration][rules][0]' => '0+@ * * * *'], t('Save'));
-    $this->assertText('0+@ * * * *');
+    $this->submitForm($job_configuration, t('Save'));
+    $this->drupalGet('admin/config/system/cron/jobs/manage/' . $this->jobId);
+    $this->submitForm(['scheduler[configuration][rules][0]' => '0+@ * * * *'], t('Save'));
+    $this->assertSession()->pageTextContains('0+@ * * * *');
 
     // Try editing the rule to an invalid one.
     $this->clickLink('Edit');
-    $this->drupalPostForm(NULL, ['scheduler[configuration][rules][0]' => '*//15+@ *-2 * * *'], t('Save'));
-    $this->assertText('Rule is invalid');
-    $this->assertTitle('Edit job | Drupal');
+    $this->submitForm(['scheduler[configuration][rules][0]' => '*//15+@ *-2 * * *'], t('Save'));
+    $this->assertSession()->pageTextContains('Rule is invalid');
+    $this->assertSession()->titleEquals('Edit job | Drupal');
 
     // Assert that there is no Delete link on the details page.
-    $this->assertNoLink('Delete');
+    $this->assertSession()->linkNotExists('Delete');
 
     // Force a job to be invalid by changing the callback.
     $job = CronJob::load($this->jobId);
@@ -173,15 +176,15 @@ public function testManageJob() {
     $this->drupalGet('admin/config/system/cron/jobs');
 
     // Assert that the invalid cron job is displayed properly.
-    $this->assertFieldByXPath('//table/tbody/tr[1]/td[6]', 'Missing');
-    $this->assertFieldByXPath('//table/tbody/tr[1]/td[8]/div/div/ul/li/a', 'Delete');
+    $this->assertSession()->elementExists('xpath','//table/tbody/tr[1]/td[6]');
+    $this->assertSession()->elementExists('xpath','//table/tbody/tr[1]/td[8]/div/div/ul/li/a');
 
     // Test deleting a job (only possible if invalid cron job).
     $this->clickLink(t('Delete'), 0);
-    $this->drupalPostForm(NULL, NULL, t('Delete'));
-    $this->assertText(t('The cron job @name has been deleted.', array('@name' => $job->label())));
+    $this->submitForm([], t('Delete'));
+    $this->assertSession()->pageTextContains(t('The cron job @name has been deleted.', array('@name' => $job->label())));
     $this->drupalGet('admin/config/system/cron/jobs');
-    $this->assertNoText($job->label());
+    $this->assertSession()->pageTextNotContains($job->label());
 
     $job = CronJob::load('ultimate_cron_cron');
 
@@ -192,13 +195,13 @@ public function testManageJob() {
     $this->drupalGet('admin/config/system/cron/jobs');
     $this->clickLink('Logs');
     $xpath = $this->xpath('//tbody/tr[@class="odd"]/td');
-    $start_time = \Drupal::service('date.formatter')->format($log_entry->start_time, 'custom', 'Y-m-d H:i:s');
-    $end_time = \Drupal::service('date.formatter')->format($log_entry->end_time, 'custom', 'Y-m-d H:i:s');
-    $this->assertEqual($xpath[1]->getText(), $start_time);
-    $this->assertEqual($xpath[2]->getText(), $end_time);
+    $start_time = \Drupal::service('date.formatter')->format((int) $log_entry->start_time, 'custom', 'Y-m-d H:i:s');
+    $end_time = \Drupal::service('date.formatter')->format((int) $log_entry->end_time, 'custom', 'Y-m-d H:i:s');
+    $this->assertEquals($xpath[1]->getText(), $start_time);
+    $this->assertEquals($xpath[2]->getText(), $end_time);
     // The message logged depends on timing, do not hardcode that.
-    $this->assertEqual($xpath[3]->getText(), $log_entry->message ?: $log_entry->formatInitMessage());
-    $this->assertEqual($xpath[4]->getText(), '00:00');
+    $this->assertEquals($xpath[3]->getText(), $log_entry->message ?: $log_entry->formatInitMessage());
+    $this->assertEquals($xpath[4]->getText(), '00:00');
 
     // Assert queue cron jobs.
     $this->config('ultimate_cron.settings')
@@ -207,12 +210,12 @@ public function testManageJob() {
 
     \Drupal::service('ultimate_cron.discovery')->discoverCronJobs();
     $this->drupalGet('admin/config/system/cron/jobs');
-    $this->assertText('Queue: Broken queue test');
+    $this->assertSession()->pageTextContains('Queue: Broken queue test');
 
     $this->drupalGet('admin/config/system/cron/jobs/manage/ultimate_cron_queue_cron_queue_test_broken_queue');
-    $this->assertFieldByName('title', 'Queue: Broken queue test');
-    $this->drupalPostForm(NULL, [], 'Save');
-    $this->assertText('job Queue: Broken queue test has been updated.');
+    $this->assertSession()->fieldValueEquals('title', 'Queue: Broken queue test');
+    $this->submitForm([], 'Save');
+    $this->assertSession()->pageTextContains('job Queue: Broken queue test has been updated.');
   }
 
 }
diff --git a/web/modules/ultimate_cron/tests/src/Functional/CronJobInstallTest.php b/web/modules/ultimate_cron/tests/src/Functional/CronJobInstallTest.php
index f89dd34c12..76fc6de662 100644
--- a/web/modules/ultimate_cron/tests/src/Functional/CronJobInstallTest.php
+++ b/web/modules/ultimate_cron/tests/src/Functional/CronJobInstallTest.php
@@ -44,19 +44,19 @@ public function testManageJob() {
     // Check default modules
     \Drupal::service('module_installer')->install(array('field'));
     $this->drupalGet('admin/config/system/cron/jobs');
-    $this->assertText('Purges deleted Field API data');
-    $this->assertText('Cleanup (caches, batch, flood, temp-files, etc.)');
-    $this->assertNoText('Deletes temporary files');
+    $this->assertSession()->pageTextContains('Purges deleted Field API data');
+    $this->assertSession()->pageTextContains('Cleanup (caches, batch, flood, temp-files, etc.)');
+    $this->assertSession()->pageTextNotContains('Deletes temporary files');
 
     // Install new module.
     \Drupal::service('module_installer')->install(array('file'));
     $this->drupalGet('admin/config/system/cron/jobs');
-    $this->assertText('Deletes temporary files');
+    $this->assertSession()->pageTextContains('Deletes temporary files');
 
     // Uninstall new module.
     \Drupal::service('module_installer')->uninstall(array('file'));
     $this->drupalGet('admin/config/system/cron/jobs');
-    $this->assertNoText('Deletes temporary files');
+    $this->assertSession()->pageTextNotContains('Deletes temporary files');
   }
 
   /**
@@ -64,8 +64,8 @@ public function testManageJob() {
    */
   public function testRequirements() {
     $element = ultimate_cron_requirements('runtime')['cron_jobs'];
-    $this->assertEqual($element['value'], t("Cron is running properly."));
-    $this->assertEqual($element['severity'], REQUIREMENT_OK);
+    $this->assertEquals($element['value'], t("Cron is running properly."));
+    $this->assertEquals($element['severity'], REQUIREMENT_OK);
 
 
     $values = array(
@@ -75,7 +75,7 @@ public function testRequirements() {
       'callback' => 'ultimate_cron_fake_cron',
     );
 
-    $job = new CronJob($values, 'ultimate_cron_job');
+    $job = CronJob::create($values);
     $job->save();
 
     \Drupal::service('cron')->run();
@@ -93,15 +93,15 @@ public function testRequirements() {
       ->execute();
 
     // Check run counter, at this point there should be 0 run.
-    $this->assertEqual(1, \Drupal::state()->get('ultimate_cron.cron_run_counter'), 'Job has run once.');
+    $this->assertEquals(1, \Drupal::state()->get('ultimate_cron.cron_run_counter'), 'Job has run once.');
     $this->assertNotEmpty($job->isBehindSchedule(), 'Job is behind schedule.');
 
     $element = ultimate_cron_requirements('runtime')['cron_jobs'];
-    $this->assertEqual($element['value'], '1 job is behind schedule', '"1 job is behind schedule." is displayed');
-    $this->assertEqual($element['description']['#markup'], 'Some jobs are behind their schedule. Please check if <a href="' .
+    $this->assertEquals($element['value'], '1 job is behind schedule', '"1 job is behind schedule." is displayed');
+    $this->assertEquals($element['description']['#markup'], 'Some jobs are behind their schedule. Please check if <a href="' .
       Url::fromRoute('system.cron', ['key' => \Drupal::state()->get('system.cron_key')])->toString() .
       '">Cron</a> is running properly.', 'Description is correct.');
-    $this->assertEqual($element['severity'], REQUIREMENT_WARNING, 'Severity is of level "Error"');
+    $this->assertEquals($element['severity'], REQUIREMENT_WARNING, 'Severity is of level "Error"');
   }
 
 }
diff --git a/web/modules/ultimate_cron/tests/src/Functional/LoggerWebTest.php b/web/modules/ultimate_cron/tests/src/Functional/LoggerWebTest.php
index 1b274551ec..6e1066a4a4 100644
--- a/web/modules/ultimate_cron/tests/src/Functional/LoggerWebTest.php
+++ b/web/modules/ultimate_cron/tests/src/Functional/LoggerWebTest.php
@@ -44,7 +44,7 @@ class LoggerWebTest extends BrowserTestBase {
   /**
    * {@inheritdoc}
    */
-  protected function setUp() {
+  protected function setUp(): void {
     parent::setUp();
     $this->user = $this->createUser([
       'administer ultimate cron',
@@ -66,8 +66,8 @@ public function testLoggerException() {
 
     // Check that the error message is displayed in its log page.
     $this->drupalGet('admin/config/system/cron/jobs/logs/ultimate_cron_logger_test_cron');
-    $this->assertRaw('/core/misc/icons/e32700/error.svg');
-    $this->assertRaw('<em class="placeholder">Exception</em>: Test cron exception in <em class="placeholder">ultimate_cron_logger_test_cron()</em> (line');
+    $this->assertSession()->responseContains('/core/misc/icons/e32700/error.svg');
+    $this->assertSession()->responseContains('<em class="placeholder">Exception</em>: Test cron exception in <em class="placeholder">ultimate_cron_logger_test_cron()</em> (line');
   }
 
   /**
@@ -84,8 +84,8 @@ public function testLoggerFatal() {
 
     // Check that the error message is displayed in its log page.
     $this->drupalGet('admin/config/system/cron/jobs/logs/ultimate_cron_logger_test_cron');
-    $this->assertRaw('/core/misc/icons/e32700/error.svg');
-    $this->assertRaw('Call to undefined function call_to_undefined_function');
+    $this->assertSession()->responseContains('/core/misc/icons/e32700/error.svg');
+    $this->assertSession()->responseContains('Call to undefined function call_to_undefined_function');
 
     // Empty the logfile, our fatal errors are expected.
     $filename = DRUPAL_ROOT . '/' . $this->siteDirectory . '/error.log';
@@ -107,7 +107,7 @@ public function testLoggerLongMessage() {
     $xpath = $this->xpath('//table/tbody/tr/td[4]');
     // The last 2 chars from xpath are not related to the message.
     $this->assertTrue(strlen(substr($xpath[0]->getText(), 0, -2)) == 5000);
-    $this->assertRaw('This is a v…');
+    $this->assertSession()->responseContains('This is a v…');
   }
 
   /**
@@ -122,8 +122,8 @@ public function testLoggerLogWarning() {
 
     // Check that the error message is displayed in its log page.
     $this->drupalGet('admin/config/system/cron/jobs/logs/ultimate_cron_logger_test_cron');
-    $this->assertRaw('/core/misc/icons/e29700/warning.svg');
-    $this->assertRaw('This is a warning message');
+    $this->assertSession()->responseContains('/core/misc/icons/e29700/warning.svg');
+    $this->assertSession()->responseContains('This is a warning message');
   }
 
 
@@ -136,8 +136,8 @@ public function testLoggerNormal() {
 
     // Check that the error message is displayed in its log page.
     $this->drupalGet('admin/config/system/cron/jobs/logs/ultimate_cron_logger_test_cron');
-    $this->assertRaw('/core/misc/icons/73b355/check.svg');
-    $this->assertText('Launched in thread 1');
+    $this->assertSession()->responseContains('/core/misc/icons/73b355/check.svg');
+    $this->assertSession()->pageTextContains('Launched in thread 1');
   }
 
   /**
diff --git a/web/modules/ultimate_cron/tests/src/Kernel/CronJobKernelTest.php b/web/modules/ultimate_cron/tests/src/Kernel/CronJobKernelTest.php
index 2124810dcc..49fec4aae8 100644
--- a/web/modules/ultimate_cron/tests/src/Kernel/CronJobKernelTest.php
+++ b/web/modules/ultimate_cron/tests/src/Kernel/CronJobKernelTest.php
@@ -19,7 +19,7 @@ class CronJobKernelTest extends KernelTestBase {
    */
   public static $modules = array('system', 'ultimate_cron');
 
-  protected function setup() {
+  protected function setup(): void {
     parent::setUp();
 
     $this->installSchema('ultimate_cron', [
diff --git a/web/modules/ultimate_cron/tests/src/Kernel/CronJobTest.php b/web/modules/ultimate_cron/tests/src/Kernel/CronJobTest.php
index fdea092712..2602a190d9 100644
--- a/web/modules/ultimate_cron/tests/src/Kernel/CronJobTest.php
+++ b/web/modules/ultimate_cron/tests/src/Kernel/CronJobTest.php
@@ -15,7 +15,7 @@ class CronJobTest extends KernelTestBase {
 
   public static $modules = array('ultimate_cron');
 
-  public function setup() {
+  public function setup(): void {
     parent::setUp();
 
     $this->installSchema('ultimate_cron', array(
diff --git a/web/modules/ultimate_cron/tests/src/Kernel/UltimateCronQueueTest.php b/web/modules/ultimate_cron/tests/src/Kernel/UltimateCronQueueTest.php
index 39cbfb8fd5..6a35c76eb1 100644
--- a/web/modules/ultimate_cron/tests/src/Kernel/UltimateCronQueueTest.php
+++ b/web/modules/ultimate_cron/tests/src/Kernel/UltimateCronQueueTest.php
@@ -23,9 +23,9 @@ class UltimateCronQueueTest extends CronQueueTest {
   /**
    * {@inheritdoc}
    */
-  protected function setUp() {
+  protected function setUp(): void {
     parent::setUp();
-    module_load_install('ultimate_cron');
+    \Drupal::moduleHandler()->loadInclude('ultimate_cron', 'install');
     ultimate_cron_install();
     $this->installSchema('ultimate_cron', [
       'ultimate_cron_log',
@@ -58,7 +58,7 @@ public function testExceptions() {
     // @see \Drupal\Core\Cron::processQueues()
     $this->connection->update('queue')
       ->condition('name', 'cron_queue_test_exception')
-      ->fields(['expire' => REQUEST_TIME - 1])
+      ->fields(['expire' => \Drupal::time()->getRequestTime() - 1])
       ->execute();
 
     // Has to be manually called for Ultimate Cron.
@@ -154,4 +154,11 @@ public function testOverriddenProcessing() {
     //   worker.
   }
 
+  /**
+   * {@inheritdoc}
+   */
+  public function testLeaseTime() {
+    $this->markTestSkipped('Test does not support ultimate cron schedule logic');
+  }
+
 }
diff --git a/web/modules/ultimate_cron/tests/ultimate_cron_logger_test/ultimate_cron_logger_test.info.yml b/web/modules/ultimate_cron/tests/ultimate_cron_logger_test/ultimate_cron_logger_test.info.yml
index 9081ead804..7d4f173c2c 100644
--- a/web/modules/ultimate_cron/tests/ultimate_cron_logger_test/ultimate_cron_logger_test.info.yml
+++ b/web/modules/ultimate_cron/tests/ultimate_cron_logger_test/ultimate_cron_logger_test.info.yml
@@ -1,12 +1,11 @@
 name: Ultimate Cron Logger Test
 type: module
 description: Ultimate Cron Logger Test
-core_version_requirement: ^8.7.7 || ^9
-package: Tests
+package: Testing
 dependencies:
   - ultimate_cron
 
-# Information added by Drupal.org packaging script on 2020-09-24
-version: '8.x-2.0-alpha5'
+# Information added by Drupal.org packaging script on 2022-10-22
+version: '8.x-2.0-alpha6'
 project: 'ultimate_cron'
-datestamp: 1600928951
+datestamp: 1666471451
diff --git a/web/modules/ultimate_cron/ultimate_cron.api.php b/web/modules/ultimate_cron/ultimate_cron.api.php
index 8f3e7d7a64..62c00502d3 100644
--- a/web/modules/ultimate_cron/ultimate_cron.api.php
+++ b/web/modules/ultimate_cron/ultimate_cron.api.php
@@ -73,7 +73,7 @@ function hook_cronapi() {
   $items['example_my_cron_job_1'] = array(
     'title' => t('This is my cron job #1'),
     'file' => 'example.jobs.inc',
-    'file path' => drupal_get_path('module', 'example') . '/cron',
+    'file path' => \Drupal::service('extension.list.module')->getPath('example') . '/cron',
     'callback' => 'example_my_cron_job_callback',
     'callback arguments' => array('cronjob1'),
     'enabled' => FALSE,
diff --git a/web/modules/ultimate_cron/ultimate_cron.info.yml b/web/modules/ultimate_cron/ultimate_cron.info.yml
index ef825f2a5a..a9cdf8b06b 100644
--- a/web/modules/ultimate_cron/ultimate_cron.info.yml
+++ b/web/modules/ultimate_cron/ultimate_cron.info.yml
@@ -1,10 +1,10 @@
 type: module
 name: "Ultimate Cron"
 description: "Cron"
-core_version_requirement: ^8.7.7 || ^9
+core_version_requirement: ^9.3 || ^10
 configure: entity.ultimate_cron_job.collection
 
-# Information added by Drupal.org packaging script on 2020-09-24
-version: '8.x-2.0-alpha5'
+# Information added by Drupal.org packaging script on 2022-10-22
+version: '8.x-2.0-alpha6'
 project: 'ultimate_cron'
-datestamp: 1600928951
+datestamp: 1666471451
diff --git a/web/modules/ultimate_cron/ultimate_cron.module b/web/modules/ultimate_cron/ultimate_cron.module
index 15035785d2..9516262f17 100755
--- a/web/modules/ultimate_cron/ultimate_cron.module
+++ b/web/modules/ultimate_cron/ultimate_cron.module
@@ -1,4 +1,8 @@
 <?php
+
+use Drupal\Core\Routing\RouteMatchInterface;
+use Drupal\Core\Database\Database;
+
 /**
  * @file
  * Ultimate Cron. Extend cron functionality in Drupal.
@@ -159,7 +163,7 @@ function ultimate_cron_hook_info() {
  * Implements hook_help().
  *
  */
-function ultimate_cron_help($route_name, \Drupal\Core\Routing\RouteMatchInterface $route_match) {
+function ultimate_cron_help($route_name, RouteMatchInterface $route_match) {
   switch ($route_name) {
     case 'help.page.ultimate_cron':
       // Return a line-break version of the module README.
@@ -256,5 +260,5 @@ function _ultimate_cron_multi_column_sort($a, $b) {
  *   Connection target.
  */
 function _ultimate_cron_get_transactional_safe_connection() {
-  return !\Drupal::config('ultimate_cron.settings')->get('bypass_transactional_safe_connection') && \Drupal\Core\Database\Database::getConnection()->inTransaction() ? 'ultimate_cron' : 'default';
+  return !\Drupal::config('ultimate_cron.settings')->get('bypass_transactional_safe_connection') && Database::getConnection()->inTransaction() ? 'ultimate_cron' : 'default';
 }
-- 
GitLab