diff --git a/brandfolder.module b/brandfolder.module
index 4be8111..6f319ee 100644
--- a/brandfolder.module
+++ b/brandfolder.module
@@ -4,7 +4,9 @@
  * @file
  * Contains brandfolder.module.
  */
-
+use Drupal\media\Entity\MediaType;
+use Drupal\Core\Database\Query\Merge;
+use Drupal\Core\Entity\EntityStorageException;
 use Drupal\brandfolder\Service\BrandfolderGatekeeper;
 use Drupal\brandfolder\Plugin\media\Source\BrandfolderImage;
 use Drupal\Component\Utility\Html;
@@ -90,7 +92,7 @@ function brandfolder_help($route_name, RouteMatchInterface $route_match) {
 /**
  * Implements hook_form_FORM_ID_alter().
  */
-function brandfolder_form_field_config_edit_form_alter(&$form, \Drupal\Core\Form\FormStateInterface $form_state, $form_id) {
+function brandfolder_form_field_config_edit_form_alter(&$form, FormStateInterface $form_state, $form_id) {
   // If this is a config form for a file-esque field using the Brandfolder
   // URI scheme, disable the file upload directory setting.
   $route_params = \Drupal::routeMatch()->getParameters();
@@ -107,7 +109,7 @@ function brandfolder_form_field_config_edit_form_alter(&$form, \Drupal\Core\Form
 /**
  * Implements hook_form_alter().
  */
-function brandfolder_form_alter(&$form, \Drupal\Core\Form\FormStateInterface $form_state, $form_id) {
+function brandfolder_form_alter(&$form, FormStateInterface $form_state, $form_id) {
   // If this is a form comprising the main media entity listing in a Media
   // Library context, for a Brandfolder-sourced media type, replace the
   // user-facing form elements with our own browsing experience.
@@ -224,7 +226,7 @@ function brandfolder_views_pre_build(ViewExecutable $view) {
  *
  * @todo: Replace with more elegant and feature-rich browser construct.
  */
-function brandfolder_browser_media_library_form_manipulator(&$form, \Drupal\Core\Form\FormStateInterface $form_state, \Drupal\media\Entity\MediaType $media_type) {
+function brandfolder_browser_media_library_form_manipulator(&$form, FormStateInterface $form_state, MediaType $media_type) {
   $media_source = $media_type->getSource();
   $gatekeeper = \Drupal::getContainer()
     ->get(BrandfolderGatekeeper::class);
@@ -234,7 +236,7 @@ function brandfolder_browser_media_library_form_manipulator(&$form, \Drupal\Core
   $selected_media_entity_ids = [];
   $selection_limit = -1;
   $build_info = $form_state->getBuildInfo();
-  if ($build_info['base_form_id'] == 'views_form_media_library_widget' && isset($build_info['args'][0]) && $build_info['args'][0] instanceof \Drupal\views\ViewExecutable) {
+  if ($build_info['base_form_id'] == 'views_form_media_library_widget' && isset($build_info['args'][0]) && $build_info['args'][0] instanceof ViewExecutable) {
     $view = $build_info['args'][0];
     if (strpos($view->current_display, 'widget') === 0) {
       try {
@@ -959,7 +961,7 @@ function brandfolder_build_labels_select_list($labels, &$select_options) {
  *
  * @throws \GuzzleHttp\Exception\GuzzleException
  */
-function brandfolder_browser_host_form_validator(array &$form, \Drupal\Core\Form\FormStateInterface &$form_state) {
+function brandfolder_browser_host_form_validator(array &$form, FormStateInterface &$form_state) {
   $triggering_element = $form_state->getTriggeringElement();
   // If the submission was triggered by one of our browser controls, the only
   // outcome should be to update the browser contents. We do not care about
@@ -981,7 +983,7 @@ function brandfolder_browser_host_form_validator(array &$form, \Drupal\Core\Form
  *
  * @throws \GuzzleHttp\Exception\GuzzleException
  */
-function brandfolder_browser_selection_converter(array &$form, \Drupal\Core\Form\FormStateInterface &$form_state) {
+function brandfolder_browser_selection_converter(array &$form, FormStateInterface &$form_state) {
   $triggering_element = $form_state->getTriggeringElement();
   // We don't need or want to perform validation when the submission is
   // triggered by one of our browser controls.
@@ -1184,7 +1186,7 @@ function brandfolder_map_attachment_to_file($attachment, $create_new_file = TRUE
           ])
           ->fields(['fid' => $fid])
           ->execute();
-        if ($result != Database\Query\Merge::STATUS_UPDATE) {
+        if ($result != Merge::STATUS_UPDATE) {
           $logger->error('Could not find an existing record in the brandfolder_file table for attachment ID !attachment_id and file ID !fid.', [
             '!fid'      => $fid,
             '!attachment_id' => $attachment_id
@@ -1196,7 +1198,7 @@ function brandfolder_map_attachment_to_file($attachment, $create_new_file = TRUE
           $attachment_id
         ]);
       }
-      catch (\Drupal\Core\Entity\EntityStorageException $e) {
+      catch (EntityStorageException $e) {
         $logger->error('There was an error saving a new file for Brandfolder attachment !attachment_id.', ['!attachment_id' => $attachment_id]);
       }
     }
@@ -1267,7 +1269,7 @@ function brandfolder_map_attachment_to_media_entity($attachment, $media_type_id,
         $media->save();
         $entity_id = $media->id();
       }
-      catch (\Drupal\Core\Entity\EntityStorageException $e) {
+      catch (EntityStorageException $e) {
         $logger->error('There was an error saving a new media entity for Brandfolder attachment !attachment_id.', ['!attachment_id' => $attachment_id]);
       }
       if ($bf_client->verboseLoggingIsEnabled()) {
diff --git a/src/Controller/AssetFetchController.php b/src/Controller/AssetFetchController.php
index da061fe..174fe8d 100644
--- a/src/Controller/AssetFetchController.php
+++ b/src/Controller/AssetFetchController.php
@@ -2,6 +2,7 @@
 
 namespace Drupal\brandfolder\Controller;
 
+use Symfony\Component\HttpFoundation\Request;
 use Drupal\brandfolder\Service\BrandfolderGatekeeper;
 use Drupal\Core\Controller\ControllerBase;
 use Drupal\Core\Form\FormStateInterface;
@@ -16,6 +17,9 @@ use Drupal\Core\Form\FormStateInterface;
  */
 class AssetFetchController extends ControllerBase {
 
+  public function __construct(private BrandfolderGatekeeper $brandfolderGatekeeper)
+  {
+  }
   /**
    * Callback for stub route used in connection with nested AJAX form requests,
    * etc.
@@ -40,7 +44,7 @@ class AssetFetchController extends ControllerBase {
    *
    * @return array
    */
-  public static function assetFetchFormAjaxCallback(array &$form, FormStateInterface $form_state, \Symfony\Component\HttpFoundation\Request $request): array {
+  public static function assetFetchFormAjaxCallback(array &$form, FormStateInterface $form_state, Request $request): array {
     $all_form_values = $form_state->getValues();
 
     $tag_key_mapping = isset($all_form_values['brandfolder_controls_tag_key_mapping']) ? json_decode($all_form_values['brandfolder_controls_tag_key_mapping'], TRUE) : [];
@@ -133,8 +137,7 @@ class AssetFetchController extends ControllerBase {
     $query_params['sort_by'] = $all_form_values['brandfolder_controls_sort_criterion'] ?? 'created_at';
     $query_params['order'] = $all_form_values['brandfolder_controls_sort_order'] ?? 'desc';
 
-    $gatekeeper = \Drupal::getContainer()
-      ->get(BrandfolderGatekeeper::class);
+    $gatekeeper = $this->brandfolderGatekeeper;
     $gatekeeper_criteria = [];
     $gatekeeper_criteria_string = $form_state->getValue('bf_gatekeeper_criteria');
     if (!empty($gatekeeper_criteria_string)) {
diff --git a/src/Controller/IncomingWebhookController.php b/src/Controller/IncomingWebhookController.php
index fa1e3d8..b2674cf 100644
--- a/src/Controller/IncomingWebhookController.php
+++ b/src/Controller/IncomingWebhookController.php
@@ -2,6 +2,7 @@
 
 namespace Drupal\brandfolder\Controller;
 
+use Drupal\Core\Access\AccessResultInterface;
 use Drupal\brandfolder\Event\BrandfolderWebhookEvent;
 use Drupal\Core\Access\AccessResult;
 use Drupal\Core\Controller\ControllerBase;
@@ -34,7 +35,7 @@ class IncomingWebhookController extends ControllerBase implements AccessInterfac
    * @return \Drupal\Core\Access\AccessResultInterface
    *   The access result.
    */
-  public function access(Request $request): \Drupal\Core\Access\AccessResultInterface {
+  public function access(Request $request): AccessResultInterface {
     $valid_payload = FALSE;
     $payload = json_decode($request->getContent(), TRUE);
     if (isset($payload['data']['attributes'])) {
diff --git a/src/Event/BrandfolderWebhookEvent.php b/src/Event/BrandfolderWebhookEvent.php
index 52dc6ca..97a5a61 100644
--- a/src/Event/BrandfolderWebhookEvent.php
+++ b/src/Event/BrandfolderWebhookEvent.php
@@ -2,7 +2,7 @@
 
 namespace Drupal\brandfolder\Event;
 
-use Symfony\Component\EventDispatcher\Event;
+use Symfony\Contracts\EventDispatcher\Event;
 
 /**
  * Multipurpose event that will be fired when Drupal receives a webhook
diff --git a/src/File/MimeType/BrandfolderMimeTypeHandler.php b/src/File/MimeType/BrandfolderMimeTypeHandler.php
index 7cfdd3f..725cd89 100644
--- a/src/File/MimeType/BrandfolderMimeTypeHandler.php
+++ b/src/File/MimeType/BrandfolderMimeTypeHandler.php
@@ -2,9 +2,9 @@
 
 namespace Drupal\brandfolder\File\MimeType;
 
+use Symfony\Component\Mime\MimeTypesInterface;
 use Drupal\Core\Extension\ModuleHandlerInterface;
 use Drupal\Core\File\MimeType\ExtensionMimeTypeGuesser;
-use Symfony\Component\HttpFoundation\File\MimeType\MimeTypeGuesserInterface as LegacyMimeTypeGuesserInterface;
 use Symfony\Component\Mime\MimeTypeGuesserInterface;
 use Drupal\Core\Database\Connection;
 
@@ -18,7 +18,7 @@ use function brandfolder_parse_uri;
  * not end with a recognized file extension.
  * Also provide mimetype and extension-related utilities.
  */
-class BrandfolderMimeTypeHandler extends ExtensionMimeTypeGuesser implements MimeTypeGuesserInterface, LegacyMimeTypeGuesserInterface {
+class BrandfolderMimeTypeHandler extends ExtensionMimeTypeGuesser implements MimeTypeGuesserInterface, MimeTypesInterface {
 
   /**
    * The database connection.
diff --git a/src/Plugin/media/Source/BrandfolderImage.php b/src/Plugin/media/Source/BrandfolderImage.php
index ff7f6c9..9c4b8be 100644
--- a/src/Plugin/media/Source/BrandfolderImage.php
+++ b/src/Plugin/media/Source/BrandfolderImage.php
@@ -132,7 +132,7 @@ class BrandfolderImage extends MediaSourceBase {
    * @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler
    *   The module handler.
    */
-  public function __construct(array $configuration, $plugin_id, $plugin_definition, EntityTypeManagerInterface $entity_type_manager, EntityFieldManagerInterface $entity_field_manager, FieldTypePluginManagerInterface $field_type_manager, ConfigFactoryInterface $config_factory, AccountProxyInterface $account_proxy, UrlGeneratorInterface $url_generator, LoggerChannelFactoryInterface $logger, CacheBackendInterface $cache, TimeInterface $time, ModuleHandlerInterface $module_handler) {
+  public function __construct(array $configuration, $plugin_id, $plugin_definition, EntityTypeManagerInterface $entity_type_manager, EntityFieldManagerInterface $entity_field_manager, FieldTypePluginManagerInterface $field_type_manager, ConfigFactoryInterface $config_factory, AccountProxyInterface $account_proxy, UrlGeneratorInterface $url_generator, LoggerChannelFactoryInterface $logger, CacheBackendInterface $cache, TimeInterface $time, ModuleHandlerInterface $module_handler, private BrandfolderGatekeeper $brandfolderGatekeeper) {
     $this->source_field_name = 'field_brandfolder_attachment_id';
 
     // Customize some aspects of the plugin definition.
@@ -632,8 +632,7 @@ class BrandfolderImage extends MediaSourceBase {
       // @todo: Update field description accordingly, disable field, etc.
     }
 
-    $gatekeeper = \Drupal::getContainer()
-      ->get(BrandfolderGatekeeper::class);
+    $gatekeeper = $this->brandfolderGatekeeper;
     $gatekeeper->loadFromMediaSource($this);
     $gatekeeper->buildConfigForm($form);
 
