diff --git a/aggregator.api.php b/aggregator.api.php
index 7ac4ecb..7df85ff 100644
--- a/aggregator.api.php
+++ b/aggregator.api.php
@@ -1,5 +1,9 @@
 <?php
 
+use Drupal\foo\Plugin\aggregator\fetcher\FooDefaultFetcher;
+use Drupal\foo\Plugin\aggregator\parser\FooDefaultParser;
+use Drupal\foo\Plugin\aggregator\processor\FooDefaultProcessor;
+
 /**
  * @file
  * Aggregator API documentation.
@@ -21,7 +25,7 @@ function hook_aggregator_fetcher_info_alter(array &$info) {
     return;
   }
 
-  $info['foo_fetcher']['class'] = Drupal\foo\Plugin\aggregator\fetcher\FooDefaultFetcher::class;
+  $info['foo_fetcher']['class'] = FooDefaultFetcher::class;
 }
 
 /**
@@ -35,7 +39,7 @@ function hook_aggregator_parser_info_alter(array &$info) {
     return;
   }
 
-  $info['foo_parser']['class'] = Drupal\foo\Plugin\aggregator\parser\FooDefaultParser::class;
+  $info['foo_parser']['class'] = FooDefaultParser::class;
 }
 
 /**
@@ -49,7 +53,7 @@ function hook_aggregator_processor_info_alter(array &$info) {
     return;
   }
 
-  $info['foo_processor']['class'] = Drupal\foo\Plugin\aggregator\processor\FooDefaultProcessor::class;
+  $info['foo_processor']['class'] = FooDefaultProcessor::class;
 }
 
 /**
diff --git a/aggregator.install b/aggregator.install
index bbf793f..015adae 100644
--- a/aggregator.install
+++ b/aggregator.install
@@ -4,7 +4,7 @@
  * @file
  * Install, update and uninstall functions for the aggregator module.
  */
-
+use Drupal\Component\Utility\DeprecationHelper;
 use Drupal\Component\Utility\Crypt;
 use Drupal\Core\Field\BaseFieldDefinition;
 use Drupal\Core\StringTranslation\TranslatableMarkup;
@@ -94,8 +94,8 @@ function aggregator_update_8603() {
   ]);
   $format->save();
 
-  $settings->clear('items.allowed_html')
-    ->save(TRUE);
+  DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.4.0', fn() => $settings->clear('items.allowed_html')->save(), fn() => $settings->clear('items.allowed_html')
+    ->save(TRUE));
 }
 
 /**
diff --git a/aggregator.module b/aggregator.module
index ace5032..5602627 100644
--- a/aggregator.module
+++ b/aggregator.module
@@ -4,7 +4,8 @@
  * @file
  * Used to aggregate syndicated content (RSS, RDF, and Atom).
  */
-
+use Drupal\Core\Hook\Attribute\LegacyHook;
+use Drupal\aggregator\Hook\AggregatorHooks;
 use Drupal\aggregator\Entity\Feed;
 use Drupal\Core\Access\AccessResult;
 use Drupal\Core\Entity\EntityTypeInterface;
@@ -18,86 +19,17 @@ use Drupal\migrate\Row;
 /**
  * Implements hook_help().
  */
+#[LegacyHook]
 function aggregator_help($route_name, RouteMatchInterface $route_match) {
-  switch ($route_name) {
-
-    case 'aggregator.opml_add':
-      return '<p>' . t('<abbr title="Outline Processor Markup Language">OPML</abbr> is an XML format for exchanging feeds between aggregators. A single OPML document may contain many feeds. Aggregator uses this file to import all feeds at once. Upload a file from your computer or enter a URL where the OPML file can be downloaded.') . '</p>';
-
-    case 'help.page.aggregator':
-      $path_validator = \Drupal::pathValidator();
-      $output = '';
-      $output .= '<h3>' . t('About') . '</h3>';
-      $output .= '<p>' . t('The Aggregator module is an on-site syndicator and news reader that gathers and displays fresh content from RSS-, RDF-, and Atom-based feeds made available across the web. Thousands of sites (particularly news sites and blogs) publish their latest headlines in feeds, using a number of standardized XML-based formats. For more information, see the <a href=":aggregator-module">online documentation for the Aggregator module</a>.', [':aggregator-module' => 'https://www.drupal.org/documentation/modules/aggregator']) . '</p>';
-      $output .= '<h3>' . t('Uses') . '</h3>';
-      $output .= '<dl>';
-      // Check if the aggregator sources View is enabled.
-      if ($url = $path_validator->getUrlIfValid('aggregator/sources')) {
-        $output .= '<dt>' . t('Viewing feeds') . '</dt>';
-        $output .= '<dd>' . t('Users view feed content in the <a href=":aggregator">main aggregator display</a>, or by <a href=":aggregator-sources">their source</a> (usually via an RSS feed reader). The most recent content in a feed can be displayed as a block through the <a href=":admin-block">Blocks administration page</a>.', [
-          ':aggregator' => Url::fromRoute('aggregator.page_last')->toString(),
-          ':aggregator-sources' => $url->toString(),
-          ':admin-block' => (\Drupal::moduleHandler()->moduleExists('block')) ? Url::fromRoute('block.admin_display')->toString() : '#',
-        ]) . '</dd>';
-      }
-      $output .= '<dt>' . t('Adding, editing, and deleting feeds') . '</dt>';
-      $output .= '<dd>' . t('Administrators can add, edit, and delete feeds, and choose how often to check each feed for newly updated items on the <a href=":feededit">Aggregator administration page</a>.', [
-        ':feededit' => Url::fromRoute('aggregator.admin_overview')->toString(),
-      ]) . '</dd>';
-      $output .= '<dt>' . t('Configuring the display of feed items') . '</dt>';
-      $output .= '<dd>' . t('Administrators can choose how many items are displayed in the listing pages, which HTML tags are allowed in the content of feed items, and whether they should be trimmed to a maximum number of characters on the <a href=":settings">Aggregator settings page</a>.', [
-        ':settings' => Url::fromRoute('aggregator.admin_settings')->toString(),
-      ]) . '</dd>';
-      $output .= '<dt>' . t('Discarding old feed items') . '</dt>';
-      $output .= '<dd>' . t('Administrators can choose whether to discard feed items that are older than a specified period of time on the <a href=":settings">Aggregator settings page</a>. This requires a correctly configured cron maintenance task (see below).', [
-        ':settings' => Url::fromRoute('aggregator.admin_settings')->toString(),
-      ]) . '<dd>';
-
-      $output .= '<dt>' . t('<abbr title="Outline Processor Markup Language">OPML</abbr> integration') . '</dt>';
-      // Check if the aggregator opml View is enabled.
-      if ($url = $path_validator->getUrlIfValid('aggregator/opml')) {
-        $output .= '<dd>' . t('A <a href=":aggregator-opml">machine-readable OPML file</a> of all feeds is available. OPML is an XML-based file format used to share outline-structured information such as a list of RSS feeds. Feeds can also be <a href=":import-opml">imported via an OPML file</a>.', [
-          ':aggregator-opml' => $url->toString(),
-          ':import-opml' => Url::fromRoute('aggregator.opml_add')->toString(),
-        ]) . '</dd>';
-      }
-      $output .= '<dt>' . t('Configuring cron') . '</dt>';
-      $output .= '<dd>' . t('A working <a href=":cron">cron maintenance task</a> is required to update feeds automatically.', [
-        ':cron' => Url::fromRoute('system.cron_settings')->toString(),
-      ]) . '</dd>';
-      $output .= '</dl>';
-      return $output;
-
-    case 'aggregator.admin_overview':
-      // Don't use placeholders for possibility to change URLs for translators.
-      $output = '<p>' . t('Many sites publish their headlines and posts in feeds, using a number of standardized XML-based formats. The aggregator supports <a href="http://en.wikipedia.org/wiki/Rss">RSS</a>, <a href="http://en.wikipedia.org/wiki/Resource_Description_Framework">RDF</a>, and <a href="http://en.wikipedia.org/wiki/Atom_%28standard%29">Atom</a>.') . '</p>';
-      // cspell:ignore addfeed
-      $output .= '<p>' . t('Current feeds are listed below, and <a href=":addfeed">new feeds may be added</a>. For each feed, the <em>@block_name</em> block may be enabled at the <a href=":block">block layout page</a>.', [
-        ':addfeed' => Url::fromRoute('aggregator.feed_add')->toString(),
-        '@block_name' => t('Aggregator feed'),
-        ':block' => (\Drupal::moduleHandler()->moduleExists('block')) ? Url::fromRoute('block.admin_display')->toString() : '#',
-      ]) . '</p>';
-      return $output;
-
-    case 'aggregator.feed_add':
-      return '<p>' . t('Add a feed in RSS, RDF or Atom format. A feed may only have one entry.') . '</p>';
-  }
+  return \Drupal::service(AggregatorHooks::class)->help($route_name, $route_match);
 }
 
 /**
  * Implements hook_theme().
  */
+#[LegacyHook]
 function aggregator_theme() {
-  return [
-    'aggregator_feed' => [
-      'render element' => 'elements',
-      'file' => 'aggregator.theme.inc',
-    ],
-    'aggregator_item' => [
-      'render element' => 'elements',
-      'file' => 'aggregator.theme.inc',
-    ],
-  ];
+  return \Drupal::service(AggregatorHooks::class)->theme();
 }
 
 /**
@@ -111,72 +43,10 @@ function aggregator_theme() {
  *   'enable_base_field_custom_preprocess_skipping' has been set using
  *   hook_entity_type_build().
  */
-function aggregator_entity_extra_field_info() {
-  $extra = [];
-  $entity_type_manager = \Drupal::entityTypeManager();
-  $entity_field_manager = \Drupal::service('entity_field.manager');
-
-  $extra['aggregator_feed']['aggregator_feed'] = [
-    'display' => [
-      'items' => [
-        'label' => t('Items'),
-        'description' => t('Items associated with this feed'),
-        'weight' => 0,
-      ],
-      'more_link' => [
-        'label' => t('More link'),
-        'description' => t('A more link to the feed detail page'),
-        'weight' => 5,
-      ],
-      'feed_icon' => [
-        'label' => t('Feed icon'),
-        'description' => t('An icon that links to the feed URL'),
-        'weight' => 6,
-      ],
-    ],
-  ];
-
-  // Create Feed image and description pseudo-fields. Skip this if the field
-  // display is configurable and skipping has been enabled.
-  // @todo https://www.drupal.org/project/drupal/issues/3015623
-  //   Eventually delete this code and matching lines in FeedViewBuilder. Using
-  //   field formatters is more flexible and consistent.
-  $skip_custom_preprocessing = $entity_type_manager->getDefinition('aggregator_feed')->get('enable_base_field_custom_preprocess_skipping');
-  $base_field_definitions = $entity_field_manager->getBaseFieldDefinitions('aggregator_feed');
-
-  if (!$skip_custom_preprocessing || !$base_field_definitions['image']->isDisplayConfigurable('view')) {
-    $extra['aggregator_feed']['aggregator_feed']['display']['image'] = [
-      'label' => t('Image'),
-      'description' => t('The feed image'),
-      'weight' => 2,
-    ];
-  }
-
-  if (!$skip_custom_preprocessing || !$base_field_definitions['description']->isDisplayConfigurable('view')) {
-    $extra['aggregator_feed']['aggregator_feed']['display']['description'] = [
-      'label' => t('Description'),
-      'description' => t('The description of this feed'),
-      'weight' => 3,
-    ];
-  }
-
-  // Create Item description pseudo-field. Skip this if the field display is
-  // configurable and skipping has been enabled.
-  // @todo https://www.drupal.org/project/drupal/issues/3015623
-  //   Eventually delete this code and matching lines in ItemViewBuilder. Using
-  //   field formatters is more flexible and consistent.
-  $skip_custom_preprocessing = $entity_type_manager->getDefinition('aggregator_item')->get('enable_base_field_custom_preprocess_skipping');
-  $base_field_definitions = $entity_field_manager->getBaseFieldDefinitions('aggregator_item');
-
-  if (!$skip_custom_preprocessing || !$base_field_definitions['description']->isDisplayConfigurable('view')) {
-    $extra['aggregator_item']['aggregator_item']['display']['description'] = [
-      'label' => t('Description'),
-      'description' => t('The description of this feed item'),
-      'weight' => 2,
-    ];
-  }
-
-  return $extra;
+#[LegacyHook]
+function aggregator_entity_extra_field_info()
+{
+    return \Drupal::service(AggregatorHooks::class)->entityExtraFieldInfo();
 }
 
 /**
@@ -184,50 +54,26 @@ function aggregator_entity_extra_field_info() {
  *
  * Queues news feeds for updates once their refresh interval has elapsed.
  */
-function aggregator_cron() {
-  $queue = \Drupal::queue('aggregator_feeds');
-
-  $ids = \Drupal::entityTypeManager()->getStorage('aggregator_feed')->getFeedIdsToRefresh();
-  foreach (Feed::loadMultiple($ids) as $feed) {
-    if ($queue->createItem($feed->id())) {
-      // Add timestamp to avoid queueing item more than once.
-      $feed->setQueuedTime(\Drupal::time()->getRequestTime());
-      $feed->save();
-    }
-  }
-
-  // Delete queued timestamp after 6 hours assuming the update has failed.
-  $ids = \Drupal::entityQuery('aggregator_feed')
-    ->accessCheck(FALSE)
-    ->condition('queued', \Drupal::time()->getRequestTime() - (3600 * 6), '<')
-    ->execute();
-
-  if ($ids) {
-    $feeds = Feed::loadMultiple($ids);
-    foreach ($feeds as $feed) {
-      $feed->setQueuedTime(0);
-      $feed->save();
-    }
-  }
+#[LegacyHook]
+function aggregator_cron()
+{
+    \Drupal::service(AggregatorHooks::class)->cron();
 }
 
 /**
  * Implements hook_preprocess_HOOK() for block templates.
  */
+#[LegacyHook]
 function aggregator_preprocess_block(&$variables) {
-  if ($variables['configuration']['provider'] == 'aggregator') {
-    $variables['attributes']['role'] = 'complementary';
-  }
+  \Drupal::service(AggregatorHooks::class)->preprocessBlock($variables);
 }
 
 /**
  * Implements hook_jsonapi_ENTITY_TYPE_filter_access() for 'aggregator_feed'.
  */
+#[LegacyHook]
 function aggregator_jsonapi_aggregator_feed_filter_access(EntityTypeInterface $entity_type, AccountInterface $account) {
-  // @see \Drupal\aggregator\FeedAccessControlHandler::checkAccess()
-  return ([
-    JSONAPI_FILTER_AMONG_ALL => AccessResult::allowedIfHasPermission($account, 'access news feeds'),
-  ]);
+  return \Drupal::service(AggregatorHooks::class)->jsonapiAggregatorFeedFilterAccess($entity_type, $account);
 }
 
 /**
@@ -235,18 +81,7 @@ function aggregator_jsonapi_aggregator_feed_filter_access(EntityTypeInterface $e
  *
  * Set feed block labels to the feed title as they were in Drupal 6 and Drupal7.
  */
+#[LegacyHook]
 function aggregator_migrate_prepare_row(Row $row, MigrateSourceInterface $source, MigrationInterface $migration) {
-  if (in_array($migration->id(), ['d6_block', 'd7_block']) && $row->getSourceProperty('module') == 'aggregator' && empty($row->getSourceProperty('title'))) {
-    // Extract the fid from the block's delta value, which is formatted like
-    // 'feed-{ID}', for example 'feed-1'.
-    $delta = $row->getSourceProperty('delta');
-    $feed_id = substr($delta, 5);
-    $query = $source->getDatabase()->select('aggregator_feed', 'af');
-    $query->addField('af', 'title');
-    $results = $query->condition('fid', $feed_id)
-      ->execute();
-    $titles = $results->fetchCol();
-    $feed_title = reset($titles);
-    $row->setSourceProperty('title', $feed_title);
-  }
+  \Drupal::service(AggregatorHooks::class)->migratePrepareRow($row, $source, $migration);
 }
diff --git a/aggregator.services.yml b/aggregator.services.yml
index d9ed415..bf06e46 100644
--- a/aggregator.services.yml
+++ b/aggregator.services.yml
@@ -32,3 +32,7 @@ services:
   keyvalue.aggregator.database:
     class: Drupal\aggregator\KeyValueStore\KeyValueDatabaseAggregatorFactory
     arguments: ['@serialization.phpserialize', '@database']
+
+  Drupal\aggregator\Hook\AggregatorHooks:
+    class: Drupal\aggregator\Hook\AggregatorHooks
+    autowire: true
diff --git a/src/Hook/AggregatorHooks.php b/src/Hook/AggregatorHooks.php
new file mode 100644
index 0000000..320e827
--- /dev/null
+++ b/src/Hook/AggregatorHooks.php
@@ -0,0 +1,250 @@
+<?php
+
+namespace Drupal\aggregator\Hook;
+
+use Drupal\aggregator\Entity\Feed;
+use Drupal\Core\Access\AccessResult;
+use Drupal\Core\Entity\EntityTypeInterface;
+use Drupal\Core\Routing\RouteMatchInterface;
+use Drupal\Core\Session\AccountInterface;
+use Drupal\Core\Url;
+use Drupal\migrate\Plugin\MigrateSourceInterface;
+use Drupal\migrate\Plugin\MigrationInterface;
+use Drupal\migrate\Row;
+use Drupal\Core\Hook\Attribute\Hook;
+/**
+ * Hook implementations for aggregator.
+ */
+class AggregatorHooks
+{
+    /**
+     * Implements hook_help().
+     */
+    #[Hook('help')]
+    public function help($route_name, \Drupal\Core\Routing\RouteMatchInterface $route_match)
+    {
+        switch ($route_name) {
+            case 'aggregator.opml_add':
+                return '<p>' . t('<abbr title="Outline Processor Markup Language">OPML</abbr> is an XML format for exchanging feeds between aggregators. A single OPML document may contain many feeds. Aggregator uses this file to import all feeds at once. Upload a file from your computer or enter a URL where the OPML file can be downloaded.') . '</p>';
+            case 'help.page.aggregator':
+                $path_validator = \Drupal::pathValidator();
+                $output = '';
+                $output .= '<h3>' . t('About') . '</h3>';
+                $output .= '<p>' . t('The Aggregator module is an on-site syndicator and news reader that gathers and displays fresh content from RSS-, RDF-, and Atom-based feeds made available across the web. Thousands of sites (particularly news sites and blogs) publish their latest headlines in feeds, using a number of standardized XML-based formats. For more information, see the <a href=":aggregator-module">online documentation for the Aggregator module</a>.', [
+                    ':aggregator-module' => 'https://www.drupal.org/documentation/modules/aggregator',
+                ]) . '</p>';
+                $output .= '<h3>' . t('Uses') . '</h3>';
+                $output .= '<dl>';
+                // Check if the aggregator sources View is enabled.
+                if ($url = $path_validator->getUrlIfValid('aggregator/sources')) {
+                    $output .= '<dt>' . t('Viewing feeds') . '</dt>';
+                    $output .= '<dd>' . t('Users view feed content in the <a href=":aggregator">main aggregator display</a>, or by <a href=":aggregator-sources">their source</a> (usually via an RSS feed reader). The most recent content in a feed can be displayed as a block through the <a href=":admin-block">Blocks administration page</a>.', [
+                        ':aggregator' => \Drupal\Core\Url::fromRoute('aggregator.page_last')->toString(),
+                        ':aggregator-sources' => $url->toString(),
+                        ':admin-block' => \Drupal::moduleHandler()->moduleExists('block') ? \Drupal\Core\Url::fromRoute('block.admin_display')->toString() : '#',
+                    ]) . '</dd>';
+                }
+                $output .= '<dt>' . t('Adding, editing, and deleting feeds') . '</dt>';
+                $output .= '<dd>' . t('Administrators can add, edit, and delete feeds, and choose how often to check each feed for newly updated items on the <a href=":feededit">Aggregator administration page</a>.', [
+                    ':feededit' => \Drupal\Core\Url::fromRoute('aggregator.admin_overview')->toString(),
+                ]) . '</dd>';
+                $output .= '<dt>' . t('Configuring the display of feed items') . '</dt>';
+                $output .= '<dd>' . t('Administrators can choose how many items are displayed in the listing pages, which HTML tags are allowed in the content of feed items, and whether they should be trimmed to a maximum number of characters on the <a href=":settings">Aggregator settings page</a>.', [
+                    ':settings' => \Drupal\Core\Url::fromRoute('aggregator.admin_settings')->toString(),
+                ]) . '</dd>';
+                $output .= '<dt>' . t('Discarding old feed items') . '</dt>';
+                $output .= '<dd>' . t('Administrators can choose whether to discard feed items that are older than a specified period of time on the <a href=":settings">Aggregator settings page</a>. This requires a correctly configured cron maintenance task (see below).', [
+                    ':settings' => \Drupal\Core\Url::fromRoute('aggregator.admin_settings')->toString(),
+                ]) . '<dd>';
+                $output .= '<dt>' . t('<abbr title="Outline Processor Markup Language">OPML</abbr> integration') . '</dt>';
+                // Check if the aggregator opml View is enabled.
+                if ($url = $path_validator->getUrlIfValid('aggregator/opml')) {
+                    $output .= '<dd>' . t('A <a href=":aggregator-opml">machine-readable OPML file</a> of all feeds is available. OPML is an XML-based file format used to share outline-structured information such as a list of RSS feeds. Feeds can also be <a href=":import-opml">imported via an OPML file</a>.', [
+                        ':aggregator-opml' => $url->toString(),
+                        ':import-opml' => \Drupal\Core\Url::fromRoute('aggregator.opml_add')->toString(),
+                    ]) . '</dd>';
+                }
+                $output .= '<dt>' . t('Configuring cron') . '</dt>';
+                $output .= '<dd>' . t('A working <a href=":cron">cron maintenance task</a> is required to update feeds automatically.', [
+                    ':cron' => \Drupal\Core\Url::fromRoute('system.cron_settings')->toString(),
+                ]) . '</dd>';
+                $output .= '</dl>';
+                return $output;
+            case 'aggregator.admin_overview':
+                // Don't use placeholders for possibility to change URLs for translators.
+                $output = '<p>' . t('Many sites publish their headlines and posts in feeds, using a number of standardized XML-based formats. The aggregator supports <a href="http://en.wikipedia.org/wiki/Rss">RSS</a>, <a href="http://en.wikipedia.org/wiki/Resource_Description_Framework">RDF</a>, and <a href="http://en.wikipedia.org/wiki/Atom_%28standard%29">Atom</a>.') . '</p>';
+                // cspell:ignore addfeed
+                $output .= '<p>' . t('Current feeds are listed below, and <a href=":addfeed">new feeds may be added</a>. For each feed, the <em>@block_name</em> block may be enabled at the <a href=":block">block layout page</a>.', [
+                    ':addfeed' => \Drupal\Core\Url::fromRoute('aggregator.feed_add')->toString(),
+                    '@block_name' => t('Aggregator feed'),
+                    ':block' => \Drupal::moduleHandler()->moduleExists('block') ? \Drupal\Core\Url::fromRoute('block.admin_display')->toString() : '#',
+                ]) . '</p>';
+                return $output;
+            case 'aggregator.feed_add':
+                return '<p>' . t('Add a feed in RSS, RDF or Atom format. A feed may only have one entry.') . '</p>';
+        }
+    }
+    /**
+     * Implements hook_theme().
+     */
+    #[Hook('theme')]
+    public function theme()
+    {
+        return [
+            'aggregator_feed' => [
+                'render element' => 'elements',
+                'file' => 'aggregator.theme.inc',
+            ],
+            'aggregator_item' => [
+                'render element' => 'elements',
+                'file' => 'aggregator.theme.inc',
+            ],
+        ];
+    }
+    /**
+     * Implements hook_entity_extra_field_info().
+     *
+     * By default this function creates pseudo-fields that mask the description and
+     * image base fields. These pseudo-fields are omitted if:
+     * - a module makes the field's display configurable via the field UI by means
+     *   of BaseFieldDefinition::setDisplayConfigurable()
+     * - AND the additional entity type property
+     *   'enable_base_field_custom_preprocess_skipping' has been set using
+     *   hook_entity_type_build().
+     */
+    #[Hook('entity_extra_field_info')]
+    public function entityExtraFieldInfo()
+    {
+        $extra = [
+        ];
+        $entity_type_manager = \Drupal::entityTypeManager();
+        $entity_field_manager = \Drupal::service('entity_field.manager');
+        $extra['aggregator_feed']['aggregator_feed'] = [
+            'display' => [
+                'items' => [
+                    'label' => t('Items'),
+                    'description' => t('Items associated with this feed'),
+                    'weight' => 0,
+                ],
+                'more_link' => [
+                    'label' => t('More link'),
+                    'description' => t('A more link to the feed detail page'),
+                    'weight' => 5,
+                ],
+                'feed_icon' => [
+                    'label' => t('Feed icon'),
+                    'description' => t('An icon that links to the feed URL'),
+                    'weight' => 6,
+                ],
+            ],
+        ];
+        // Create Feed image and description pseudo-fields. Skip this if the field
+        // display is configurable and skipping has been enabled.
+        // @todo https://www.drupal.org/project/drupal/issues/3015623
+        //   Eventually delete this code and matching lines in FeedViewBuilder. Using
+        //   field formatters is more flexible and consistent.
+        $skip_custom_preprocessing = $entity_type_manager->getDefinition('aggregator_feed')->get('enable_base_field_custom_preprocess_skipping');
+        $base_field_definitions = $entity_field_manager->getBaseFieldDefinitions('aggregator_feed');
+        if (!$skip_custom_preprocessing || !$base_field_definitions['image']->isDisplayConfigurable('view')) {
+            $extra['aggregator_feed']['aggregator_feed']['display']['image'] = [
+                'label' => t('Image'),
+                'description' => t('The feed image'),
+                'weight' => 2,
+            ];
+        }
+        if (!$skip_custom_preprocessing || !$base_field_definitions['description']->isDisplayConfigurable('view')) {
+            $extra['aggregator_feed']['aggregator_feed']['display']['description'] = [
+                'label' => t('Description'),
+                'description' => t('The description of this feed'),
+                'weight' => 3,
+            ];
+        }
+        // Create Item description pseudo-field. Skip this if the field display is
+        // configurable and skipping has been enabled.
+        // @todo https://www.drupal.org/project/drupal/issues/3015623
+        //   Eventually delete this code and matching lines in ItemViewBuilder. Using
+        //   field formatters is more flexible and consistent.
+        $skip_custom_preprocessing = $entity_type_manager->getDefinition('aggregator_item')->get('enable_base_field_custom_preprocess_skipping');
+        $base_field_definitions = $entity_field_manager->getBaseFieldDefinitions('aggregator_item');
+        if (!$skip_custom_preprocessing || !$base_field_definitions['description']->isDisplayConfigurable('view')) {
+            $extra['aggregator_item']['aggregator_item']['display']['description'] = [
+                'label' => t('Description'),
+                'description' => t('The description of this feed item'),
+                'weight' => 2,
+            ];
+        }
+        return $extra;
+    }
+    /**
+     * Implements hook_cron().
+     *
+     * Queues news feeds for updates once their refresh interval has elapsed.
+     */
+    #[Hook('cron')]
+    public function cron()
+    {
+        $queue = \Drupal::queue('aggregator_feeds');
+        $ids = \Drupal::entityTypeManager()->getStorage('aggregator_feed')->getFeedIdsToRefresh();
+        foreach (\Drupal\aggregator\Entity\Feed::loadMultiple($ids) as $feed) {
+            if ($queue->createItem($feed->id())) {
+                // Add timestamp to avoid queueing item more than once.
+                $feed->setQueuedTime(\Drupal::time()->getRequestTime());
+                $feed->save();
+            }
+        }
+        // Delete queued timestamp after 6 hours assuming the update has failed.
+        $ids = \Drupal::entityQuery('aggregator_feed')->accessCheck(FALSE)->condition('queued', \Drupal::time()->getRequestTime() - 3600 * 6, '<')->execute();
+        if ($ids) {
+            $feeds = \Drupal\aggregator\Entity\Feed::loadMultiple($ids);
+            foreach ($feeds as $feed) {
+                $feed->setQueuedTime(0);
+                $feed->save();
+            }
+        }
+    }
+    /**
+     * Implements hook_preprocess_HOOK() for block templates.
+     */
+    #[Hook('preprocess_block')]
+    public function preprocessBlock(&$variables)
+    {
+        if ($variables['configuration']['provider'] == 'aggregator') {
+            $variables['attributes']['role'] = 'complementary';
+        }
+    }
+    /**
+     * Implements hook_jsonapi_ENTITY_TYPE_filter_access() for 'aggregator_feed'.
+     */
+    #[Hook('jsonapi_aggregator_feed_filter_access')]
+    public function jsonapiAggregatorFeedFilterAccess(\Drupal\Core\Entity\EntityTypeInterface $entity_type, \Drupal\Core\Session\AccountInterface $account)
+    {
+        // @see \Drupal\aggregator\FeedAccessControlHandler::checkAccess()
+        return [
+            JSONAPI_FILTER_AMONG_ALL => \Drupal\Core\Access\AccessResult::allowedIfHasPermission($account, 'access news feeds'),
+        ];
+    }
+    /**
+     * Implements hook_migrate_prepare_row().
+     *
+     * Set feed block labels to the feed title as they were in Drupal 6 and Drupal7.
+     */
+    #[Hook('migrate_prepare_row')]
+    public function migratePrepareRow(\Drupal\migrate\Row $row, \Drupal\migrate\Plugin\MigrateSourceInterface $source, \Drupal\migrate\Plugin\MigrationInterface $migration)
+    {
+        if (in_array($migration->id(), [
+            'd6_block',
+            'd7_block',
+        ]) && $row->getSourceProperty('module') == 'aggregator' && empty($row->getSourceProperty('title'))) {
+            // Extract the fid from the block's delta value, which is formatted like
+            // 'feed-{ID}', for example 'feed-1'.
+            $delta = $row->getSourceProperty('delta');
+            $feed_id = substr($delta, 5);
+            $query = $source->getDatabase()->select('aggregator_feed', 'af');
+            $query->addField('af', 'title');
+            $results = $query->condition('fid', $feed_id)->execute();
+            $titles = $results->fetchCol();
+            $feed_title = reset($titles);
+            $row->setSourceProperty('title', $feed_title);
+        }
+    }
+}
diff --git a/tests/modules/aggregator_display_configurable_test/aggregator_display_configurable_test.module b/tests/modules/aggregator_display_configurable_test/aggregator_display_configurable_test.module
index 0b675a2..cefd048 100644
--- a/tests/modules/aggregator_display_configurable_test/aggregator_display_configurable_test.module
+++ b/tests/modules/aggregator_display_configurable_test/aggregator_display_configurable_test.module
@@ -4,36 +4,24 @@
  * @file
  * A module for testing when aggregator_feed base fields' displays configurable.
  */
-
+use Drupal\Core\Hook\Attribute\LegacyHook;
+use Drupal\aggregator_display_configurable_test\Hook\AggregatorDisplayConfigurableTestHooks;
 use Drupal\Core\Entity\EntityTypeInterface;
 
 /**
  * Implements hook_entity_base_field_info_alter().
  */
-function aggregator_display_configurable_test_entity_base_field_info_alter(&$base_field_definitions, EntityTypeInterface $entity_type) {
-  /** @var \Drupal\Core\Field\BaseFieldDefinition[] $base_field_definitions */
-
-  if ($entity_type->id() === 'aggregator_feed') {
-    $base_field_definitions['title']->setDisplayConfigurable('view', TRUE);
-    $base_field_definitions['description']->setDisplayConfigurable('view', TRUE);
-    $base_field_definitions['image']->setDisplayConfigurable('view', TRUE);
-  }
-
-  if ($entity_type->id() === 'aggregator_item') {
-    $base_field_definitions['title']->setDisplayConfigurable('view', TRUE);
-    $options = [
-      'type' => 'text_default',
-      'label' => 'above',
-    ];
-    $base_field_definitions['title']->setDisplayOptions('view', $options);
-  }
+#[LegacyHook]
+function aggregator_display_configurable_test_entity_base_field_info_alter(&$base_field_definitions, EntityTypeInterface $entity_type)
+{
+    \Drupal::service(AggregatorDisplayConfigurableTestHooks::class)->entityBaseFieldInfoAlter($base_field_definitions, $entity_type);
 }
 
 /**
  * Implements hook_entity_type_build().
  */
-function aggregator_display_configurable_test_entity_type_build(array &$entity_types) {
-  // Allow skipping of extra preprocessing for configurable display.
-  $entity_types['aggregator_feed']->set('enable_base_field_custom_preprocess_skipping', TRUE);
-  $entity_types['aggregator_item']->set('enable_base_field_custom_preprocess_skipping', TRUE);
+#[LegacyHook]
+function aggregator_display_configurable_test_entity_type_build(array &$entity_types)
+{
+    \Drupal::service(AggregatorDisplayConfigurableTestHooks::class)->entityTypeBuild($entity_types);
 }
diff --git a/tests/modules/aggregator_display_configurable_test/aggregator_display_configurable_test.services.yml b/tests/modules/aggregator_display_configurable_test/aggregator_display_configurable_test.services.yml
new file mode 100644
index 0000000..79c78fd
--- /dev/null
+++ b/tests/modules/aggregator_display_configurable_test/aggregator_display_configurable_test.services.yml
@@ -0,0 +1,5 @@
+
+services:
+  Drupal\aggregator_display_configurable_test\Hook\AggregatorDisplayConfigurableTestHooks:
+    class: Drupal\aggregator_display_configurable_test\Hook\AggregatorDisplayConfigurableTestHooks
+    autowire: true
diff --git a/tests/modules/aggregator_display_configurable_test/src/Hook/AggregatorDisplayConfigurableTestHooks.php b/tests/modules/aggregator_display_configurable_test/src/Hook/AggregatorDisplayConfigurableTestHooks.php
new file mode 100644
index 0000000..15c8dee
--- /dev/null
+++ b/tests/modules/aggregator_display_configurable_test/src/Hook/AggregatorDisplayConfigurableTestHooks.php
@@ -0,0 +1,43 @@
+<?php
+
+namespace Drupal\aggregator_display_configurable_test\Hook;
+
+use Drupal\Core\Entity\EntityTypeInterface;
+use Drupal\Core\Hook\Attribute\Hook;
+/**
+ * Hook implementations for aggregator_display_configurable_test.
+ */
+class AggregatorDisplayConfigurableTestHooks
+{
+    /**
+     * Implements hook_entity_base_field_info_alter().
+     */
+    #[Hook('entity_base_field_info_alter')]
+    public function entityBaseFieldInfoAlter(&$base_field_definitions, \Drupal\Core\Entity\EntityTypeInterface $entity_type)
+    {
+        /** @var \Drupal\Core\Field\BaseFieldDefinition[] $base_field_definitions */
+        if ($entity_type->id() === 'aggregator_feed') {
+            $base_field_definitions['title']->setDisplayConfigurable('view', TRUE);
+            $base_field_definitions['description']->setDisplayConfigurable('view', TRUE);
+            $base_field_definitions['image']->setDisplayConfigurable('view', TRUE);
+        }
+        if ($entity_type->id() === 'aggregator_item') {
+            $base_field_definitions['title']->setDisplayConfigurable('view', TRUE);
+            $options = [
+                'type' => 'text_default',
+                'label' => 'above',
+            ];
+            $base_field_definitions['title']->setDisplayOptions('view', $options);
+        }
+    }
+    /**
+     * Implements hook_entity_type_build().
+     */
+    #[Hook('entity_type_build')]
+    public function entityTypeBuild(array &$entity_types)
+    {
+        // Allow skipping of extra preprocessing for configurable display.
+        $entity_types['aggregator_feed']->set('enable_base_field_custom_preprocess_skipping', TRUE);
+        $entity_types['aggregator_item']->set('enable_base_field_custom_preprocess_skipping', TRUE);
+    }
+}
diff --git a/tests/modules/aggregator_test/aggregator_test.module b/tests/modules/aggregator_test/aggregator_test.module
index c8d65c4..000439d 100644
--- a/tests/modules/aggregator_test/aggregator_test.module
+++ b/tests/modules/aggregator_test/aggregator_test.module
@@ -1,5 +1,8 @@
 <?php
 
+use Drupal\Core\Hook\Attribute\LegacyHook;
+use Drupal\aggregator_test\Hook\AggregatorTestHooks;
+
 /**
  * @file
  * Helper module for the Aggregator tests.
@@ -8,20 +11,23 @@
 /**
  * Implements hook_aggregator_fetcher_info_alter().
  */
+#[LegacyHook]
 function aggregator_test_aggregator_fetcher_info_alter(array &$info) {
-  $info['aggregator_test_fetcher']['definition_altered'] = TRUE;
+  \Drupal::service(AggregatorTestHooks::class)->aggregatorFetcherInfoAlter($info);
 }
 
 /**
  * Implements hook_aggregator_parser_info_alter().
  */
+#[LegacyHook]
 function aggregator_test_aggregator_parser_info_alter(array &$info) {
-  $info['aggregator_test_parser']['definition_altered'] = TRUE;
+  \Drupal::service(AggregatorTestHooks::class)->aggregatorParserInfoAlter($info);
 }
 
 /**
  * Implements hook_aggregator_processor_info_alter().
  */
+#[LegacyHook]
 function aggregator_test_aggregator_processor_info_alter(array &$info) {
-  $info['aggregator_test_processor']['definition_altered'] = TRUE;
+  \Drupal::service(AggregatorTestHooks::class)->aggregatorProcessorInfoAlter($info);
 }
diff --git a/tests/modules/aggregator_test/aggregator_test.services.yml b/tests/modules/aggregator_test/aggregator_test.services.yml
new file mode 100644
index 0000000..a03a33f
--- /dev/null
+++ b/tests/modules/aggregator_test/aggregator_test.services.yml
@@ -0,0 +1,5 @@
+
+services:
+  Drupal\aggregator_test\Hook\AggregatorTestHooks:
+    class: Drupal\aggregator_test\Hook\AggregatorTestHooks
+    autowire: true
diff --git a/tests/modules/aggregator_test/src/Hook/AggregatorTestHooks.php b/tests/modules/aggregator_test/src/Hook/AggregatorTestHooks.php
new file mode 100644
index 0000000..01eb8b7
--- /dev/null
+++ b/tests/modules/aggregator_test/src/Hook/AggregatorTestHooks.php
@@ -0,0 +1,39 @@
+<?php
+
+namespace Drupal\aggregator_test\Hook;
+
+use Drupal\Core\Hook\Attribute\Hook;
+/**
+ * Hook implementations for aggregator_test.
+ */
+class AggregatorTestHooks
+{
+    /**
+     * @file
+     * Helper module for the Aggregator tests.
+     */
+    /**
+     * Implements hook_aggregator_fetcher_info_alter().
+     */
+    #[Hook('aggregator_fetcher_info_alter')]
+    public function aggregatorFetcherInfoAlter(array &$info)
+    {
+        $info['aggregator_test_fetcher']['definition_altered'] = TRUE;
+    }
+    /**
+     * Implements hook_aggregator_parser_info_alter().
+     */
+    #[Hook('aggregator_parser_info_alter')]
+    public function aggregatorParserInfoAlter(array &$info)
+    {
+        $info['aggregator_test_parser']['definition_altered'] = TRUE;
+    }
+    /**
+     * Implements hook_aggregator_processor_info_alter().
+     */
+    #[Hook('aggregator_processor_info_alter')]
+    public function aggregatorProcessorInfoAlter(array &$info)
+    {
+        $info['aggregator_test_processor']['definition_altered'] = TRUE;
+    }
+}
diff --git a/tests/src/Functional/migrate_drupal_ui/d6/UpgradeTest.php b/tests/src/Functional/migrate_drupal_ui/d6/UpgradeTest.php
index 12e9e19..965d04b 100644
--- a/tests/src/Functional/migrate_drupal_ui/d6/UpgradeTest.php
+++ b/tests/src/Functional/migrate_drupal_ui/d6/UpgradeTest.php
@@ -26,6 +26,7 @@ class UpgradeTest extends MigrateUpgradeExecuteTestBase {
    * @phpstan-ignore-next-line
    */
   protected function setUp(): void {
+    parent::setUp();
     MigrateUpgradeTestBase::setUp();
     $this->loadFixture($this->getModulePath('aggregator') . '/tests/fixtures/drupal6.php');
   }
diff --git a/tests/src/Functional/migrate_drupal_ui/d7/UpgradeTest.php b/tests/src/Functional/migrate_drupal_ui/d7/UpgradeTest.php
index 50abbee..53e2f3d 100644
--- a/tests/src/Functional/migrate_drupal_ui/d7/UpgradeTest.php
+++ b/tests/src/Functional/migrate_drupal_ui/d7/UpgradeTest.php
@@ -26,6 +26,7 @@ class UpgradeTest extends MigrateUpgradeExecuteTestBase {
    * @phpstan-ignore-next-line
    */
   protected function setUp(): void {
+    parent::setUp();
     MigrateUpgradeTestBase::setUp();
     $this->loadFixture($this->getModulePath('aggregator') . '/tests/fixtures/drupal7.php');
   }
