diff --git a/core/lib/Drupal/Core/Entity/EntityTypeListener.php b/core/lib/Drupal/Core/Entity/EntityTypeListener.php
index 9ab4fab633..0adcecfb62 100644
--- a/core/lib/Drupal/Core/Entity/EntityTypeListener.php
+++ b/core/lib/Drupal/Core/Entity/EntityTypeListener.php
@@ -71,13 +71,12 @@ public function onEntityTypeCreate(EntityTypeInterface $entity_type) {
       $storage->onEntityTypeCreate($entity_type);
     }
 
+    $this->eventDispatcher->dispatch(EntityTypeEvents::CREATE, new EntityTypeEvent($entity_type));
+
     $this->entityLastInstalledSchemaRepository->setLastInstalledDefinition($entity_type);
     if ($entity_type->entityClassImplements(FieldableEntityInterface::class)) {
       $this->entityLastInstalledSchemaRepository->setLastInstalledFieldStorageDefinitions($entity_type_id, $this->entityFieldManager->getFieldStorageDefinitions($entity_type_id));
     }
-
-    $this->eventDispatcher->dispatch(EntityTypeEvents::CREATE, new EntityTypeEvent($entity_type));
-    $this->clearCachedDefinitions();
   }
 
   /**
@@ -95,10 +94,9 @@ public function onEntityTypeUpdate(EntityTypeInterface $entity_type, EntityTypeI
       $storage->onEntityTypeUpdate($entity_type, $original);
     }
 
-    $this->entityLastInstalledSchemaRepository->setLastInstalledDefinition($entity_type);
-
     $this->eventDispatcher->dispatch(EntityTypeEvents::UPDATE, new EntityTypeEvent($entity_type, $original));
-    $this->clearCachedDefinitions();
+
+    $this->entityLastInstalledSchemaRepository->setLastInstalledDefinition($entity_type);
   }
 
   /**
@@ -118,10 +116,9 @@ public function onEntityTypeDelete(EntityTypeInterface $entity_type) {
       $storage->onEntityTypeDelete($entity_type);
     }
 
-    $this->entityLastInstalledSchemaRepository->deleteLastInstalledDefinition($entity_type_id);
-
     $this->eventDispatcher->dispatch(EntityTypeEvents::DELETE, new EntityTypeEvent($entity_type));
-    $this->clearCachedDefinitions();
+
+    $this->entityLastInstalledSchemaRepository->deleteLastInstalledDefinition($entity_type_id);
   }
 
   /**
@@ -138,22 +135,13 @@ public function onFieldableEntityTypeUpdate(EntityTypeInterface $entity_type, En
     }
 
     if ($sandbox === NULL || (isset($sandbox['#finished']) && $sandbox['#finished'] == 1)) {
+      $this->eventDispatcher->dispatch(EntityTypeEvents::UPDATE, new EntityTypeEvent($entity_type, $original));
+
       $this->entityLastInstalledSchemaRepository->setLastInstalledDefinition($entity_type);
       if ($entity_type->entityClassImplements(FieldableEntityInterface::class)) {
         $this->entityLastInstalledSchemaRepository->setLastInstalledFieldStorageDefinitions($entity_type_id, $field_storage_definitions);
       }
-
-      $this->eventDispatcher->dispatch(EntityTypeEvents::UPDATE, new EntityTypeEvent($entity_type, $original));
-      $this->clearCachedDefinitions();
     }
   }
 
-  /**
-   * Clears necessary caches to apply entity/field definition updates.
-   */
-  protected function clearCachedDefinitions() {
-    $this->entityTypeManager->clearCachedDefinitions();
-    $this->entityFieldManager->clearCachedFieldDefinitions();
-  }
-
 }
diff --git a/core/lib/Drupal/Core/Entity/Plugin/DataType/Deriver/EntityDeriver.php b/core/lib/Drupal/Core/Entity/Plugin/DataType/Deriver/EntityDeriver.php
index 8320bb4558..3b2a52cd79 100644
--- a/core/lib/Drupal/Core/Entity/Plugin/DataType/Deriver/EntityDeriver.php
+++ b/core/lib/Drupal/Core/Entity/Plugin/DataType/Deriver/EntityDeriver.php
@@ -105,12 +105,11 @@ public function getDerivativeDefinitions($base_plugin_definition) {
       ] + $base_plugin_definition;
 
       // Incorporate the bundles as entity:$entity_type:$bundle, if any.
-      $bundle_info = $this->bundleInfoService->getBundleInfo($entity_type_id);
-      if (count($bundle_info) > 1 || $entity_type->getKey('bundle')) {
-        foreach ($bundle_info as $bundle => $info) {
+      foreach ($this->bundleInfoService->getBundleInfo($entity_type_id) as $bundle => $bundle_info) {
+        if ($bundle !== $entity_type_id) {
           $this->derivatives[$entity_type_id . ':' . $bundle] = [
             'class' => $class,
-            'label' => $info['label'],
+            'label' => $bundle_info['label'],
             'constraints' => $this->derivatives[$entity_type_id]['constraints'],
           ] + $base_plugin_definition;
         }
diff --git a/core/lib/Drupal/Core/Field/FieldStorageDefinitionListener.php b/core/lib/Drupal/Core/Field/FieldStorageDefinitionListener.php
index b73f3411e5..fda621b929 100644
--- a/core/lib/Drupal/Core/Field/FieldStorageDefinitionListener.php
+++ b/core/lib/Drupal/Core/Field/FieldStorageDefinitionListener.php
@@ -85,9 +85,9 @@ public function onFieldStorageDefinitionCreate(FieldStorageDefinitionInterface $
       $storage->onFieldStorageDefinitionCreate($storage_definition);
     }
 
-    $this->entityLastInstalledSchemaRepository->setLastInstalledFieldStorageDefinition($storage_definition);
-
     $this->eventDispatcher->dispatch(FieldStorageDefinitionEvents::CREATE, new FieldStorageDefinitionEvent($storage_definition));
+
+    $this->entityLastInstalledSchemaRepository->setLastInstalledFieldStorageDefinition($storage_definition);
     $this->entityFieldManager->clearCachedFieldDefinitions();
   }
 
@@ -104,9 +104,9 @@ public function onFieldStorageDefinitionUpdate(FieldStorageDefinitionInterface $
       $storage->onFieldStorageDefinitionUpdate($storage_definition, $original);
     }
 
-    $this->entityLastInstalledSchemaRepository->setLastInstalledFieldStorageDefinition($storage_definition);
-
     $this->eventDispatcher->dispatch(FieldStorageDefinitionEvents::UPDATE, new FieldStorageDefinitionEvent($storage_definition, $original));
+
+    $this->entityLastInstalledSchemaRepository->setLastInstalledFieldStorageDefinition($storage_definition);
     $this->entityFieldManager->clearCachedFieldDefinitions();
   }
 
@@ -133,9 +133,9 @@ public function onFieldStorageDefinitionDelete(FieldStorageDefinitionInterface $
       $storage->onFieldStorageDefinitionDelete($storage_definition);
     }
 
-    $this->entityLastInstalledSchemaRepository->deleteLastInstalledFieldStorageDefinition($storage_definition);
-
     $this->eventDispatcher->dispatch(FieldStorageDefinitionEvents::DELETE, new FieldStorageDefinitionEvent($storage_definition));
+
+    $this->entityLastInstalledSchemaRepository->deleteLastInstalledFieldStorageDefinition($storage_definition);
     $this->entityFieldManager->clearCachedFieldDefinitions();
   }
 
diff --git a/core/modules/field/tests/src/Kernel/Migrate/d6/MigrateFieldTest.php b/core/modules/field/tests/src/Kernel/Migrate/d6/MigrateFieldTest.php
index 01d16807c6..6173a3a734 100644
--- a/core/modules/field/tests/src/Kernel/Migrate/d6/MigrateFieldTest.php
+++ b/core/modules/field/tests/src/Kernel/Migrate/d6/MigrateFieldTest.php
@@ -120,9 +120,12 @@ public function testFields() {
     $this->assertSame($migration->getSourcePlugin()->count(), $migration->getIdMap()->processedCount());
 
     // Check that we've reported on a conflict in widget_types.
-    $messages = iterator_to_array($migration->getIdMap()->getMessages());
+    $messages = [];
+    foreach ($migration->getIdMap()->getMessageIterator() as $message_row) {
+      $messages[] = $message_row->message;
+    }
     $this->assertCount(1, $messages);
-    $this->assertSame($messages[0]->message, 'Widget types optionwidgets_onoff, text_textfield are used in Drupal 6 field instances: widget type optionwidgets_onoff applied to the Drupal 8 base field');
+    $this->assertSame($messages[0], 'Widget types optionwidgets_onoff, text_textfield are used in Drupal 6 field instances: widget type optionwidgets_onoff applied to the Drupal 8 base field');
   }
 
 }
diff --git a/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldInstanceTest.php b/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldInstanceTest.php
index 3b32918e55..ed70c74415 100644
--- a/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldInstanceTest.php
+++ b/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldInstanceTest.php
@@ -196,9 +196,10 @@ public function testTextFieldInstances() {
     // For each text field instances that were skipped, there should be a log
     // message with the required steps to fix this.
     $migration = $this->getMigration('d7_field_instance');
+    $messages = $migration->getIdMap()->getMessageIterator()->fetchAll();
     $errors = array_map(function ($message) {
       return $message->message;
-    }, iterator_to_array($migration->getIdMap()->getMessages()));
+    }, $messages);
     $this->assertCount(8, $errors);
     sort($errors);
     $message = 'Can\'t migrate source field field_text_long_plain_filtered configured with both plain text and filtered text processing. See https://www.drupal.org/docs/8/upgrade/known-issues-when-upgrading-from-drupal-6-or-7-to-drupal-8#plain-text';
diff --git a/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldTest.php b/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldTest.php
index 2fa3af38ef..14c6c31767 100644
--- a/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldTest.php
+++ b/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldTest.php
@@ -173,9 +173,10 @@ public function testTextFields() {
     // For each text field bases that were skipped, there should be a log
     // message with the required steps to fix this.
     $migration = $this->getMigration('d7_field');
+    $messages = $migration->getIdMap()->getMessageIterator()->fetchAll();
     $errors = array_map(function ($message) {
       return $message->message;
-    }, iterator_to_array($migration->getIdMap()->getMessages()));
+    }, $messages);
     sort($errors);
     $this->assertCount(4, $errors);
     $this->assertEquals($errors[0], 'Can\'t migrate source field field_text_long_plain_filtered configured with both plain text and filtered text processing. See https://www.drupal.org/docs/8/upgrade/known-issues-when-upgrading-from-drupal-6-or-7-to-drupal-8#plain-text');
diff --git a/core/modules/image/tests/src/Kernel/Migrate/d6/MigrateImageCacheTest.php b/core/modules/image/tests/src/Kernel/Migrate/d6/MigrateImageCacheTest.php
index de7a276050..f609cd7da2 100644
--- a/core/modules/image/tests/src/Kernel/Migrate/d6/MigrateImageCacheTest.php
+++ b/core/modules/image/tests/src/Kernel/Migrate/d6/MigrateImageCacheTest.php
@@ -105,10 +105,15 @@ public function testMissingEffectPlugin() {
 
     $this->startCollectingMessages();
     $this->executeMigration('d6_imagecache_presets');
-    $messages = iterator_to_array($this->migration->getIdMap()->getMessages());
-    $this->assertCount(1, $messages);
-    $this->assertContains('The "image_deprecated_scale" plugin does not exist.', $messages[0]->message);
-    $this->assertEqual($messages[0]->level, MigrationInterface::MESSAGE_ERROR);
+    $messages = $this->migration->getIdMap()->getMessageIterator();
+    $count = 0;
+    foreach ($messages as $message) {
+      $count++;
+      $this->assertContains('The "image_deprecated_scale" plugin does not exist.', $message->message);
+      $this->assertEqual($message->level, MigrationInterface::MESSAGE_ERROR);
+    }
+    // There should be only the one message.
+    $this->assertEqual($count, 1);
   }
 
   /**
diff --git a/core/modules/jsonapi/src/CacheableResourceResponse.php b/core/modules/jsonapi/src/CacheableResourceResponse.php
new file mode 100644
index 0000000000..4692ae2a06
--- /dev/null
+++ b/core/modules/jsonapi/src/CacheableResourceResponse.php
@@ -0,0 +1,28 @@
+<?php
+
+namespace Drupal\jsonapi;
+
+use Drupal\Core\Cache\CacheableResponseInterface;
+use Drupal\Core\Cache\CacheableResponseTrait;
+
+/**
+ * Extends ResourceResponse with cacheability.
+ *
+ * We want to have the same functionality for both responses that are cacheable
+ * and those that are not.  This response class should be used in all instances
+ * where the response is expected to be cacheable.  This approach is similar
+ * to the REST module's ModifiedResourceResponse.
+ *
+ * @internal JSON:API maintains no PHP API since its API is the HTTP API. This
+ *   class may change at any time and this will break any dependencies on it.
+ *
+ * @see https://www.drupal.org/project/jsonapi/issues/3032787
+ * @see jsonapi.api.php
+ *
+ * @see \Drupal\rest\ModifiedResourceResponse
+ */
+class CacheableResourceResponse extends ResourceResponse implements CacheableResponseInterface {
+
+  use CacheableResponseTrait;
+
+}
diff --git a/core/modules/jsonapi/src/Controller/EntityResource.php b/core/modules/jsonapi/src/Controller/EntityResource.php
index 5c43d3ee24..00fbdad972 100644
--- a/core/modules/jsonapi/src/Controller/EntityResource.php
+++ b/core/modules/jsonapi/src/Controller/EntityResource.php
@@ -26,6 +26,7 @@
 use Drupal\Core\Session\AccountInterface;
 use Drupal\Core\Url;
 use Drupal\jsonapi\Access\EntityAccessChecker;
+use Drupal\jsonapi\CacheableResourceResponse;
 use Drupal\jsonapi\Context\FieldResolver;
 use Drupal\jsonapi\Entity\EntityValidationTrait;
 use Drupal\jsonapi\Access\TemporaryQueryGuard;
@@ -272,7 +273,6 @@ public function createIndividual(ResourceType $resource_type, Request $request)
     // we should send "Location" header to the frontend.
     if ($resource_type->isLocatable()) {
       $url = $resource_object->toUrl()->setAbsolute()->toString(TRUE);
-      $response->addCacheableDependency($url);
       $response->headers->set('Location', $url->getGeneratedUrl());
     }
 
@@ -520,7 +520,9 @@ function (EntityInterface $entity) {
 
     // $response does not contain the entity list cache tag. We add the
     // cacheable metadata for the finite list of entities in the relationship.
-    $response->addCacheableDependency($entity);
+    if ($response instanceof CacheableResourceResponse) {
+      $response->addCacheableDependency($entity);
+    }
 
     return $response;
   }
@@ -553,7 +555,9 @@ public function getRelationship(ResourceType $resource_type, FieldableEntityInte
       return $links->withLink($key, new Link(new CacheableMetadata(), $relationship_object_urls[$key], [$key]));
     }, new LinkCollection([])));
     // Add the host entity as a cacheable dependency.
-    $response->addCacheableDependency($entity);
+    if ($response instanceof CacheableResourceResponse) {
+      $response->addCacheableDependency($entity);
+    }
     return $response;
   }
 
@@ -980,14 +984,20 @@ protected function buildWrappedResponse($data, Request $request, IncludedData $i
       $self_link = new Link(new CacheableMetadata(), self::getRequestLink($request), ['self']);
       $links = $links->withLink('self', $self_link);
     }
-    $response = new ResourceResponse(new JsonApiDocumentTopLevel($data, $includes, $links, $meta), $response_code, $headers);
-    $cacheability = (new CacheableMetadata())->addCacheContexts([
-      // Make sure that different sparse fieldsets are cached differently.
-      'url.query_args:fields',
-      // Make sure that different sets of includes are cached differently.
-      'url.query_args:include',
-    ]);
-    $response->addCacheableDependency($cacheability);
+    $document = new JsonApiDocumentTopLevel($data, $includes, $links, $meta);
+    if ($request->isMethodCacheable()) {
+      $response = new CacheableResourceResponse($document, $response_code, $headers);
+      $cacheability = (new CacheableMetadata())->addCacheContexts([
+        // Make sure that different sparse fieldsets are cached differently.
+        'url.query_args:fields',
+        // Make sure that different sets of includes are cached differently.
+        'url.query_args:include',
+      ]);
+      $response->addCacheableDependency($cacheability);
+    }
+    else {
+      $response = new ResourceResponse($document, $response_code, $headers);
+    }
     return $response;
   }
 
diff --git a/core/modules/jsonapi/src/Controller/EntryPoint.php b/core/modules/jsonapi/src/Controller/EntryPoint.php
index bbbc2d56d1..d00f52be86 100644
--- a/core/modules/jsonapi/src/Controller/EntryPoint.php
+++ b/core/modules/jsonapi/src/Controller/EntryPoint.php
@@ -6,12 +6,12 @@
 use Drupal\Core\Controller\ControllerBase;
 use Drupal\Core\Session\AccountInterface;
 use Drupal\Core\Url;
+use Drupal\jsonapi\CacheableResourceResponse;
 use Drupal\jsonapi\JsonApiResource\JsonApiDocumentTopLevel;
 use Drupal\jsonapi\JsonApiResource\LinkCollection;
 use Drupal\jsonapi\JsonApiResource\NullIncludedData;
 use Drupal\jsonapi\JsonApiResource\Link;
 use Drupal\jsonapi\JsonApiResource\ResourceObjectData;
-use Drupal\jsonapi\ResourceResponse;
 use Drupal\jsonapi\ResourceType\ResourceType;
 use Drupal\jsonapi\ResourceType\ResourceTypeRepositoryInterface;
 use Drupal\user\Entity\User;
@@ -116,7 +116,7 @@ public function index() {
       }
     }
 
-    $response = new ResourceResponse(new JsonApiDocumentTopLevel(new ResourceObjectData([]), new NullIncludedData(), $urls, $meta));
+    $response = new CacheableResourceResponse(new JsonApiDocumentTopLevel(new ResourceObjectData([]), new NullIncludedData(), $urls, $meta));
     return $response->addCacheableDependency($cacheability);
   }
 
diff --git a/core/modules/jsonapi/src/EventSubscriber/DefaultExceptionSubscriber.php b/core/modules/jsonapi/src/EventSubscriber/DefaultExceptionSubscriber.php
index 0220ef55dd..aec5b0f030 100644
--- a/core/modules/jsonapi/src/EventSubscriber/DefaultExceptionSubscriber.php
+++ b/core/modules/jsonapi/src/EventSubscriber/DefaultExceptionSubscriber.php
@@ -2,6 +2,7 @@
 
 namespace Drupal\jsonapi\EventSubscriber;
 
+use Drupal\jsonapi\CacheableResourceResponse;
 use Drupal\jsonapi\JsonApiResource\ErrorCollection;
 use Drupal\jsonapi\JsonApiResource\JsonApiDocumentTopLevel;
 use Drupal\jsonapi\JsonApiResource\LinkCollection;
@@ -59,7 +60,6 @@ protected function setEventResponse(GetResponseForExceptionEvent $event, $status
     /* @var \Symfony\Component\HttpKernel\Exception\HttpException $exception */
     $exception = $event->getException();
     $response = new ResourceResponse(new JsonApiDocumentTopLevel(new ErrorCollection([$exception]), new NullIncludedData(), new LinkCollection([])), $exception->getStatusCode(), $exception->getHeaders());
-    $response->addCacheableDependency($exception);
     $event->setResponse($response);
   }
 
diff --git a/core/modules/jsonapi/src/EventSubscriber/ResourceResponseSubscriber.php b/core/modules/jsonapi/src/EventSubscriber/ResourceResponseSubscriber.php
index 9bf6aaa43a..8fff7e4406 100644
--- a/core/modules/jsonapi/src/EventSubscriber/ResourceResponseSubscriber.php
+++ b/core/modules/jsonapi/src/EventSubscriber/ResourceResponseSubscriber.php
@@ -4,6 +4,7 @@
 
 use Drupal\Core\Cache\CacheableResponse;
 use Drupal\Core\Cache\CacheableResponseInterface;
+use Drupal\jsonapi\CacheableResourceResponse;
 use Drupal\jsonapi\Normalizer\Value\CacheableNormalization;
 use Drupal\jsonapi\ResourceResponse;
 use Symfony\Component\EventDispatcher\EventSubscriberInterface;
@@ -121,9 +122,11 @@ protected function renderResponseBody(Request $request, ResourceResponse $respon
       // Having just normalized the data, we can associate its cacheability with
       // the response object.
       assert($jsonapi_doc_object instanceof CacheableNormalization);
-      $response->addCacheableDependency($jsonapi_doc_object);
       // Finally, encode the normalized data (JSON:API's encoder rasterizes it
       // automatically).
+      if ($response instanceof CacheableResourceResponse) {
+        $response->addCacheableDependency($jsonapi_doc_object);
+      }
       $response->setContent($serializer->encode($jsonapi_doc_object->getNormalization(), $format));
       $response->headers->set('Content-Type', $request->getMimeType($format));
     }
diff --git a/core/modules/jsonapi/src/JsonApiResource/Link.php b/core/modules/jsonapi/src/JsonApiResource/Link.php
index 5634f983df..1da2d0afe8 100644
--- a/core/modules/jsonapi/src/JsonApiResource/Link.php
+++ b/core/modules/jsonapi/src/JsonApiResource/Link.php
@@ -76,7 +76,9 @@ public function __construct(CacheableMetadata $cacheability, Url $url, array $li
     assert(/* !empty($link_relation_types) && */Inspector::assertAllStrings($link_relation_types));
     assert(Inspector::assertAllStrings(array_keys($target_attributes)));
     assert(Inspector::assertAll(function ($target_attribute_value) {
-      return is_string($target_attribute_value) || is_array($target_attribute_value);
+      return is_string($target_attribute_value)
+        || is_array($target_attribute_value)
+        && Inspector::assertAllStrings($target_attribute_value);
     }, array_values($target_attributes)));
     $generated_url = $url->setAbsolute()->toString(TRUE);
     $this->href = $generated_url->getGeneratedUrl();
@@ -158,7 +160,17 @@ public static function compare(Link $a, Link $b) {
   public static function merge(Link $a, Link $b) {
     assert(static::compare($a, $b) === 0);
     $merged_rels = array_unique(array_merge($a->getLinkRelationTypes(), $b->getLinkRelationTypes()));
-    $merged_attributes = array_merge_recursive($a->getTargetAttributes(), $b->getTargetAttributes());
+    $merged_attributes = $a->getTargetAttributes();
+    foreach ($b->getTargetAttributes() as $key => $value) {
+      if (isset($merged_attributes[$key])) {
+        // The attribute values can be either a string or an array of strings.
+        $value = array_unique(array_merge(
+          is_string($merged_attributes[$key]) ? [$merged_attributes[$key]] : $merged_attributes[$key],
+          is_string($value) ? [$value] : $value
+        ));
+      }
+      $merged_attributes[$key] = count($value) === 1 ? reset($value) : $value;
+    }
     $merged_cacheability = (new CacheableMetadata())->addCacheableDependency($a)->addCacheableDependency($b);
     return new static($merged_cacheability, $a->getUri(), $merged_rels, $merged_attributes);
   }
diff --git a/core/modules/jsonapi/src/ResourceResponse.php b/core/modules/jsonapi/src/ResourceResponse.php
index b73165d170..5bfbe930e7 100644
--- a/core/modules/jsonapi/src/ResourceResponse.php
+++ b/core/modules/jsonapi/src/ResourceResponse.php
@@ -2,8 +2,6 @@
 
 namespace Drupal\jsonapi;
 
-use Drupal\Core\Cache\CacheableResponseInterface;
-use Drupal\Core\Cache\CacheableResponseTrait;
 use Symfony\Component\HttpFoundation\Response;
 
 /**
@@ -22,9 +20,7 @@
  *
  * @see \Drupal\rest\ModifiedResourceResponse
  */
-class ResourceResponse extends Response implements CacheableResponseInterface {
-
-  use CacheableResponseTrait;
+class ResourceResponse extends Response {
 
   /**
    * Response data that should be serialized.
diff --git a/core/modules/jsonapi/tests/src/Functional/ResourceResponseTestTrait.php b/core/modules/jsonapi/tests/src/Functional/ResourceResponseTestTrait.php
index 04a173ff71..342e55ff6b 100644
--- a/core/modules/jsonapi/tests/src/Functional/ResourceResponseTestTrait.php
+++ b/core/modules/jsonapi/tests/src/Functional/ResourceResponseTestTrait.php
@@ -11,8 +11,8 @@
 use Drupal\Core\Entity\EntityInterface;
 use Drupal\Core\Entity\RevisionableInterface;
 use Drupal\Core\Url;
+use Drupal\jsonapi\CacheableResourceResponse;
 use Drupal\jsonapi\Normalizer\HttpExceptionNormalizer;
-use Drupal\jsonapi\ResourceResponse;
 use Psr\Http\Message\ResponseInterface;
 
 /**
@@ -38,7 +38,7 @@ trait ResourceResponseTestTrait {
    *   be deduced from the number of responses, because a multiple cardinality
    *   field may have only one value.
    *
-   * @return \Drupal\jsonapi\ResourceResponse
+   * @return \Drupal\jsonapi\CacheableResourceResponse
    *   The merged ResourceResponse.
    */
   protected static function toCollectionResourceResponse(array $responses, $self_link, $is_multiple) {
@@ -103,7 +103,7 @@ protected static function toCollectionResourceResponse(array $responses, $self_l
     // individual resources in those collections, which means any '4xx-response'
     // cache tags on the individual responses should also be omitted.
     $merged_cacheability->setCacheTags(array_diff($merged_cacheability->getCacheTags(), ['4xx-response']));
-    return (new ResourceResponse($merged_document, 200))->addCacheableDependency($merged_cacheability);
+    return (new CacheableResourceResponse($merged_document, 200))->addCacheableDependency($merged_cacheability);
   }
 
   /**
@@ -203,7 +203,7 @@ protected function getExpectedIncludedResourceResponse(array $include_paths, arr
     $basic_cacheability = (new CacheableMetadata())
       ->addCacheTags($this->getExpectedCacheTags())
       ->addCacheContexts($this->getExpectedCacheContexts());
-    return static::decorateExpectedResponseForIncludedFields(ResourceResponse::create($individual_document), $resource_data['responses'])
+    return static::decorateExpectedResponseForIncludedFields(CacheableResourceResponse::create($individual_document), $resource_data['responses'])
       ->addCacheableDependency($basic_cacheability);
   }
 
@@ -230,7 +230,7 @@ protected static function toResourceResponses(array $responses) {
    * @param \Psr\Http\Message\ResponseInterface $response
    *   A PSR response to be mapped.
    *
-   * @return \Drupal\jsonapi\ResourceResponse
+   * @return \Drupal\jsonapi\CacheableResourceResponse
    *   The ResourceResponse.
    */
   protected static function toResourceResponse(ResponseInterface $response) {
@@ -245,7 +245,7 @@ protected static function toResourceResponse(ResponseInterface $response) {
       $cacheability->setCacheMaxAge(($dynamic_cache[0] === 'UNCACHEABLE' && $response->getStatusCode() < 400) ? 0 : Cache::PERMANENT);
     }
     $related_document = Json::decode($response->getBody());
-    $resource_response = new ResourceResponse($related_document, $response->getStatusCode());
+    $resource_response = new CacheableResourceResponse($related_document, $response->getStatusCode());
     return $resource_response->addCacheableDependency($cacheability);
   }
 
@@ -496,7 +496,7 @@ protected function getResponses(array $links, array $request_options) {
    *   (optional) Document pointer for the JSON:API error object. FALSE to omit
    *   the pointer.
    *
-   * @return \Drupal\jsonapi\ResourceResponse
+   * @return \Drupal\jsonapi\CacheableResourceResponse
    *   The forbidden ResourceResponse.
    */
   protected static function getAccessDeniedResponse(EntityInterface $entity, AccessResultInterface $access, Url $via_link, $relationship_field_name = NULL, $detail = NULL, $pointer = NULL) {
@@ -519,7 +519,7 @@ protected static function getAccessDeniedResponse(EntityInterface $entity, Acces
       $error['links']['via']['href'] = $via_link->setAbsolute()->toString();
     }
 
-    return (new ResourceResponse([
+    return (new CacheableResourceResponse([
       'jsonapi' => static::$jsonApiMember,
       'errors' => [$error],
     ], 403))
@@ -536,7 +536,7 @@ protected static function getAccessDeniedResponse(EntityInterface $entity, Acces
    * @param string $self_link
    *   The self link for collection ResourceResponse.
    *
-   * @return \Drupal\jsonapi\ResourceResponse
+   * @return \Drupal\jsonapi\CacheableResourceResponse
    *   The empty collection ResourceResponse.
    */
   protected function getEmptyCollectionResponse($cardinality, $self_link) {
@@ -549,7 +549,7 @@ protected function getEmptyCollectionResponse($cardinality, $self_link) {
       'url.site',
     ], $this->entity->getEntityType()->isRevisionable() ? ['url.query_args:resourceVersion'] : []);
     $cacheability = (new CacheableMetadata())->addCacheContexts($cache_contexts)->addCacheTags(['http_response']);
-    return (new ResourceResponse([
+    return (new CacheableResourceResponse([
       // Empty to-one relationships should be NULL and empty to-many
       // relationships should be an empty array.
       'data' => $cardinality === 1 ? NULL : [],
diff --git a/core/modules/jsonapi/tests/src/Functional/ResourceTestBase.php b/core/modules/jsonapi/tests/src/Functional/ResourceTestBase.php
index 6257adb4d8..a963c055b2 100644
--- a/core/modules/jsonapi/tests/src/Functional/ResourceTestBase.php
+++ b/core/modules/jsonapi/tests/src/Functional/ResourceTestBase.php
@@ -27,6 +27,7 @@
 use Drupal\Core\Url;
 use Drupal\field\Entity\FieldConfig;
 use Drupal\field\Entity\FieldStorageConfig;
+use Drupal\jsonapi\CacheableResourceResponse;
 use Drupal\jsonapi\JsonApiResource\LinkCollection;
 use Drupal\jsonapi\JsonApiResource\NullIncludedData;
 use Drupal\jsonapi\JsonApiResource\Link;
@@ -1256,7 +1257,7 @@ protected function getExpectedCollectionResponse(array $collection, $self_link,
     $cacheability = static::getExpectedCollectionCacheability($this->account, $collection, NULL, $filtered);
     $cacheability->setCacheMaxAge($merged_response->getCacheableMetadata()->getCacheMaxAge());
 
-    $collection_response = ResourceResponse::create($merged_document);
+    $collection_response = CacheableResourceResponse::create($merged_document);
     $collection_response->addCacheableDependency($cacheability);
 
     if (is_null($included_paths)) {
@@ -1671,7 +1672,7 @@ protected function doTestRelationshipMutation(array $request_options) {
    * @param \Drupal\Core\Entity\EntityInterface|null $entity
    *   (optional) The entity for which to get expected relationship response.
    *
-   * @return \Drupal\jsonapi\ResourceResponse
+   * @return \Drupal\jsonapi\CacheableResourceResponse
    *   The expected ResourceResponse.
    */
   protected function getExpectedGetRelationshipResponse($relationship_field_name, EntityInterface $entity = NULL) {
@@ -1696,7 +1697,7 @@ protected function getExpectedGetRelationshipResponse($relationship_field_name,
       ->addCacheableDependency($entity)
       ->addCacheableDependency($access);
     $status_code = isset($expected_document['errors'][0]['status']) ? $expected_document['errors'][0]['status'] : 200;
-    $resource_response = new ResourceResponse($expected_document, $status_code);
+    $resource_response = new CacheableResourceResponse($expected_document, $status_code);
     $resource_response->addCacheableDependency($expected_cacheability);
     return $resource_response;
   }
@@ -1844,7 +1845,7 @@ protected function getExpectedRelatedResponse($relationship_field_name, array $r
         $cacheability = (new CacheableMetadata())->addCacheContexts($cache_contexts)->addCacheTags(['http_response']);
         $related_response = isset($relationship_document['errors'])
           ? $relationship_response
-          : (new ResourceResponse(static::getEmptyCollectionResponse(!is_null($relationship_document['data']), $self_link)->getResponseData()))->addCacheableDependency($cacheability);
+          : (new CacheableResourceResponse(static::getEmptyCollectionResponse(!is_null($relationship_document['data']), $self_link)->getResponseData()))->addCacheableDependency($cacheability);
       }
       else {
         $is_to_one_relationship = static::isResourceIdentifier($relationship_document['data']);
@@ -3159,15 +3160,15 @@ public function testRevisions() {
    * the expected cacheability for those includes. It does so based of responses
    * from the related routes for individual relationships.
    *
-   * @param \Drupal\jsonapi\ResourceResponse $expected_response
+   * @param \Drupal\jsonapi\CacheableResourceResponse $expected_response
    *   The expected ResourceResponse.
    * @param \Drupal\jsonapi\ResourceResponse[] $related_responses
    *   The related ResourceResponses, keyed by relationship field names.
    *
-   * @return \Drupal\jsonapi\ResourceResponse
+   * @return \Drupal\jsonapi\CacheableResourceResponse
    *   The decorated ResourceResponse.
    */
-  protected static function decorateExpectedResponseForIncludedFields(ResourceResponse $expected_response, array $related_responses) {
+  protected static function decorateExpectedResponseForIncludedFields(CacheableResourceResponse $expected_response, array $related_responses) {
     $expected_document = $expected_response->getResponseData();
     $expected_cacheability = $expected_response->getCacheableMetadata();
     foreach ($related_responses as $related_response) {
@@ -3194,17 +3195,17 @@ protected static function decorateExpectedResponseForIncludedFields(ResourceResp
         }
       }
     }
-    return (new ResourceResponse($expected_document))->addCacheableDependency($expected_cacheability);
+    return (new CacheableResourceResponse($expected_document))->addCacheableDependency($expected_cacheability);
   }
 
   /**
    * Gets the expected individual ResourceResponse for GET.
    *
-   * @return \Drupal\jsonapi\ResourceResponse
+   * @return \Drupal\jsonapi\CacheableResourceResponse
    *   The expected individual ResourceResponse.
    */
   protected function getExpectedGetIndividualResourceResponse($status_code = 200) {
-    $resource_response = new ResourceResponse($this->getExpectedDocument(), $status_code);
+    $resource_response = new CacheableResourceResponse($this->getExpectedDocument(), $status_code);
     $cacheability = new CacheableMetadata();
     $cacheability->setCacheContexts($this->getExpectedCacheContexts());
     $cacheability->setCacheTags($this->getExpectedCacheTags());
diff --git a/core/modules/jsonapi/tests/src/Kernel/Controller/EntityResourceTest.php b/core/modules/jsonapi/tests/src/Kernel/Controller/EntityResourceTest.php
index d60d66dcf4..643fa40b46 100644
--- a/core/modules/jsonapi/tests/src/Kernel/Controller/EntityResourceTest.php
+++ b/core/modules/jsonapi/tests/src/Kernel/Controller/EntityResourceTest.php
@@ -3,6 +3,7 @@
 namespace Drupal\Tests\jsonapi\Kernel\Controller;
 
 use Drupal\Core\Field\FieldStorageDefinitionInterface;
+use Drupal\jsonapi\CacheableResourceResponse;
 use Drupal\jsonapi\ResourceType\ResourceType;
 use Drupal\jsonapi\JsonApiResource\Data;
 use Drupal\jsonapi\JsonApiResource\JsonApiDocumentTopLevel;
@@ -200,6 +201,7 @@ public function testGetPagedCollection() {
     $response = $entity_resource->getCollection($resource_type, $request);
 
     // Assertions.
+    $this->assertInstanceof(CacheableResourceResponse::class, $response);
     $this->assertInstanceOf(JsonApiDocumentTopLevel::class, $response->getResponseData());
     $this->assertInstanceOf(Data::class, $response->getResponseData()->getData());
     $data = $response->getResponseData()->getData();
@@ -220,6 +222,7 @@ public function testGetEmptyCollection() {
     $response = $this->entityResource->getCollection($resource_type, $request);
 
     // Assertions.
+    $this->assertInstanceof(CacheableResourceResponse::class, $response);
     $this->assertInstanceOf(JsonApiDocumentTopLevel::class, $response->getResponseData());
     $this->assertInstanceOf(Data::class, $response->getResponseData()->getData());
     $this->assertEquals(0, $response->getResponseData()->getData()->count());
diff --git a/core/modules/jsonapi/tests/src/Unit/JsonApiResource/LinkTest.php b/core/modules/jsonapi/tests/src/Unit/JsonApiResource/LinkTest.php
deleted file mode 100644
index 91441a8ea5..0000000000
--- a/core/modules/jsonapi/tests/src/Unit/JsonApiResource/LinkTest.php
+++ /dev/null
@@ -1,99 +0,0 @@
-<?php
-
-namespace Drupal\Tests\jsonapi\Unit\JsonApiResource;
-
-use Drupal\Core\Cache\CacheableMetadata;
-use Drupal\Core\DependencyInjection\ContainerBuilder;
-use Drupal\Core\GeneratedUrl;
-use Drupal\Core\Url;
-use Drupal\Core\Utility\UnroutedUrlAssemblerInterface;
-use Drupal\jsonapi\JsonApiResource\Link;
-use Drupal\Tests\UnitTestCase;
-
-/**
- * @coversDefaultClass \Drupal\jsonapi\JsonApiResource\Link
- * @group jsonapi
- *
- * @internal
- */
-class LinkTest extends UnitTestCase {
-
-  /**
-   * @covers ::merge
-   * @dataProvider mergeTargetAttributesProvider
-   */
-  public function testMergeTargetAttributes($a, $b, $expected) {
-    $this->assertSame($expected->getTargetAttributes(), Link::merge($a, $b)->getTargetAttributes());
-  }
-
-  /**
-   * Provides test data for link merging.
-   */
-  public function mergeTargetAttributesProvider() {
-    $cases = [
-      'strings' => [
-        ['key' => 'foo'],
-        ['key' => 'bar'],
-        ['key' => ['foo', 'bar']],
-      ],
-      'string and array' => [
-        ['key' => 'foo'],
-        ['key' => ['bar', 'baz']],
-        ['key' => ['foo', 'bar', 'baz']],
-      ],
-      'one-dimensional indexed arrays' => [
-        ['key' => ['foo']],
-        ['key' => ['bar']],
-        ['key' => ['foo', 'bar']],
-      ],
-      'one-dimensional keyed arrays' => [
-        ['key' => ['foo' => 'tball']],
-        ['key' => ['bar' => 'ista']],
-        [
-          'key' => [
-            'foo' => 'tball',
-            'bar' => 'ista',
-          ],
-        ],
-      ],
-      'two-dimensional indexed arrays' => [
-        ['one' => ['two' => ['foo']]],
-        ['one' => ['two' => ['bar']]],
-        ['one' => ['two' => ['foo', 'bar']]],
-      ],
-      'two-dimensional keyed arrays' => [
-        ['one' => ['two' => ['foo' => 'tball']]],
-        ['one' => ['two' => ['bar' => 'ista']]],
-        [
-          'one' => [
-            'two' => [
-              'foo' => 'tball',
-              'bar' => 'ista',
-            ],
-          ],
-        ],
-      ],
-    ];
-    $this->mockUrlAssembler();
-    return array_map(function ($arguments) {
-      return array_map(function ($attributes) {
-        return new Link(new CacheableMetadata(), Url::fromUri('https://jsonapi.org/'), ['item'], $attributes);
-      }, $arguments);
-    }, $cases);
-  }
-
-  /**
-   * Mocks the unrouted URL assembler.
-   */
-  protected function mockUrlAssembler() {
-    $url_assembler = $this->getMockBuilder(UnroutedUrlAssemblerInterface::class)
-      ->disableOriginalConstructor()
-      ->getMock();
-    $url_assembler->method('assemble')->willReturn((new GeneratedUrl())->setGeneratedUrl('https://jsonapi.org/'));
-
-    $container = new ContainerBuilder();
-    $container->set('unrouted_url_assembler', $url_assembler);
-    \Drupal::setContainer($container);
-  }
-
-}
diff --git a/core/modules/language/tests/src/Kernel/Migrate/d6/MigrateDefaultLanguageTest.php b/core/modules/language/tests/src/Kernel/Migrate/d6/MigrateDefaultLanguageTest.php
index 16f723dfc5..e76b4553ee 100644
--- a/core/modules/language/tests/src/Kernel/Migrate/d6/MigrateDefaultLanguageTest.php
+++ b/core/modules/language/tests/src/Kernel/Migrate/d6/MigrateDefaultLanguageTest.php
@@ -41,7 +41,7 @@ public function testMigrationWithNonExistentLanguage() {
     $this->executeMigrations(['language', 'default_language']);
 
     // Tests the migration log contains an error message.
-    $messages = $this->migration->getIdMap()->getMessages();
+    $messages = $this->migration->getIdMap()->getMessageIterator();
     $count = 0;
     foreach ($messages as $message) {
       $count++;
@@ -62,7 +62,7 @@ public function testMigrationWithUnsetVariable() {
     $this->startCollectingMessages();
     $this->executeMigrations(['language', 'default_language']);
 
-    $messages = $this->migration->getIdMap()->getMessages()->fetchAll();
+    $messages = $this->migration->getIdMap()->getMessageIterator()->fetchAll();
     // Make sure there's no migration exceptions.
     $this->assertEmpty($messages);
     // Make sure the default langcode is 'en', as it was the default on D6 & D7.
diff --git a/core/modules/language/tests/src/Kernel/Migrate/d7/MigrateDefaultLanguageTest.php b/core/modules/language/tests/src/Kernel/Migrate/d7/MigrateDefaultLanguageTest.php
index 9a1998b7c0..2a11b25628 100644
--- a/core/modules/language/tests/src/Kernel/Migrate/d7/MigrateDefaultLanguageTest.php
+++ b/core/modules/language/tests/src/Kernel/Migrate/d7/MigrateDefaultLanguageTest.php
@@ -41,7 +41,7 @@ public function testMigrationWithNonExistentLanguage() {
     $this->executeMigrations(['language', 'default_language']);
 
     // Tests the migration log contains an error message.
-    $messages = $this->migration->getIdMap()->getMessages();
+    $messages = $this->migration->getIdMap()->getMessageIterator();
     $count = 0;
     foreach ($messages as $message) {
       $count++;
@@ -62,7 +62,7 @@ public function testMigrationWithUnsetVariable() {
     $this->startCollectingMessages();
     $this->executeMigrations(['language', 'default_language']);
 
-    $messages = $this->migration->getIdMap()->getMessages()->fetchAll();
+    $messages = $this->migration->getIdMap()->getMessageIterator()->fetchAll();
     // Make sure there's no migration exceptions.
     $this->assertEmpty($messages);
     // Make sure the default langcode is 'en', as it was the default on D6 & D7.
diff --git a/core/modules/language/tests/src/Kernel/Migrate/d7/MigrateLanguageContentSettingsTest.php b/core/modules/language/tests/src/Kernel/Migrate/d7/MigrateLanguageContentSettingsTest.php
index 1e05e9193d..7adc1f8b55 100644
--- a/core/modules/language/tests/src/Kernel/Migrate/d7/MigrateLanguageContentSettingsTest.php
+++ b/core/modules/language/tests/src/Kernel/Migrate/d7/MigrateLanguageContentSettingsTest.php
@@ -53,7 +53,7 @@ public function testLanguageContent() {
     $this->assertSame($config->getDefaultLangcode(), 'site_default');
 
     // Make sure there's no migration exceptions.
-    $messages = $this->migration->getIdMap()->getMessages()->fetchAll();
+    $messages = $this->migration->getIdMap()->getMessageIterator()->fetchAll();
     $this->assertEmpty($messages);
 
     // Assert that a content type translatable with entity_translation is still
diff --git a/core/modules/migrate/src/Plugin/MigrateIdMapInterface.php b/core/modules/migrate/src/Plugin/MigrateIdMapInterface.php
index 0783f3acad..3482e4d3b8 100644
--- a/core/modules/migrate/src/Plugin/MigrateIdMapInterface.php
+++ b/core/modules/migrate/src/Plugin/MigrateIdMapInterface.php
@@ -62,27 +62,6 @@ public function saveIdMapping(Row $row, array $destination_id_values, $status =
    */
   public function saveMessage(array $source_id_values, $message, $level = MigrationInterface::MESSAGE_ERROR);
 
-  /**
-   * Retrieves a traversable object of messages related to source records.
-   *
-   * @param array $source_id_values
-   *   (optional) The source identifier keyed values of the record, e.g.
-   *   ['nid' => 5]. If empty (the default), all messages are retrieved.
-   * @param int $level
-   *   (optional) Message severity. If NULL (the default), retrieve messages of
-   *   all severities.
-   *
-   * @return \Traversable
-   *   Retrieves a traversable object of message objects of unspecified class.
-   *   Each object has the following public properties:
-   *   - source_row_hash: the hash of the entire serialized source row data.
-   *   - message: the text of the message.
-   *   - level: one of MigrationInterface::MESSAGE_ERROR,
-   *   MigrationInterface::MESSAGE_WARNING, MigrationInterface::MESSAGE_NOTICE,
-   *   MigrationInterface::MESSAGE_INFORMATIONAL.
-   */
-  public function getMessages(array $source_id_values = [], $level = NULL);
-
   /**
    * Retrieves an iterator over messages relate to source records.
    *
@@ -95,11 +74,6 @@ public function getMessages(array $source_id_values = [], $level = NULL);
    *
    * @return \Iterator
    *   Retrieves an iterator over the message rows.
-   *
-   * @deprecated in drupal:8.8.0 and is removed from drupal:9.0.0.
-   *   Use \Drupal\migrate\Plugin\MigrateIdMapInterface::getMessages() instead.
-   *
-   * @see https://www.drupal.org/node/3060969
    */
   public function getMessageIterator(array $source_id_values = [], $level = NULL);
 
diff --git a/core/modules/migrate/src/Plugin/migrate/id_map/NullIdMap.php b/core/modules/migrate/src/Plugin/migrate/id_map/NullIdMap.php
index 0699703ecc..7b792cb3c5 100644
--- a/core/modules/migrate/src/Plugin/migrate/id_map/NullIdMap.php
+++ b/core/modules/migrate/src/Plugin/migrate/id_map/NullIdMap.php
@@ -81,19 +81,11 @@ public function saveMessage(array $source_id_values, $message, $level = Migratio
     // Do nothing.
   }
 
-  /**
-   * {@inheritdoc}
-   */
-  public function getMessages(array $source_id_values = [], $level = NULL) {
-    return new \ArrayIterator([]);
-  }
-
   /**
    * {@inheritdoc}
    */
   public function getMessageIterator(array $source_id_values = [], $level = NULL) {
-    @trigger_error('getMessageIterator() is deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. Use getMessages() instead. See https://www.drupal.org/node/3060969', E_USER_DEPRECATED);
-    return $this->getMessages($source_id_values, $level);
+    return new \ArrayIterator([]);
   }
 
   /**
diff --git a/core/modules/migrate/src/Plugin/migrate/id_map/Sql.php b/core/modules/migrate/src/Plugin/migrate/id_map/Sql.php
index 03f631fb26..4ae4686ef7 100644
--- a/core/modules/migrate/src/Plugin/migrate/id_map/Sql.php
+++ b/core/modules/migrate/src/Plugin/migrate/id_map/Sql.php
@@ -676,7 +676,7 @@ public function saveMessage(array $source_id_values, $message, $level = Migratio
   /**
    * {@inheritdoc}
    */
-  public function getMessages(array $source_id_values = [], $level = NULL) {
+  public function getMessageIterator(array $source_id_values = [], $level = NULL) {
     $query = $this->getDatabase()->select($this->messageTableName(), 'msg');
     $condition = sprintf('msg.%s = map.%s', $this::SOURCE_IDS_HASH, $this::SOURCE_IDS_HASH);
     $query->addJoin('LEFT', $this->mapTableName(), 'map', $condition);
@@ -698,14 +698,6 @@ public function getMessages(array $source_id_values = [], $level = NULL) {
     return $query->execute();
   }
 
-  /**
-   * {@inheritdoc}
-   */
-  public function getMessageIterator(array $source_id_values = [], $level = NULL) {
-    @trigger_error('getMessageIterator() is deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. Use getMessages() instead. See https://www.drupal.org/node/3060969', E_USER_DEPRECATED);
-    return $this->getMessages($source_id_values, $level);
-  }
-
   /**
    * {@inheritdoc}
    */
diff --git a/core/modules/migrate/tests/src/Functional/process/DownloadFunctionalTest.php b/core/modules/migrate/tests/src/Functional/process/DownloadFunctionalTest.php
index 28824fb094..5e890a0e6a 100644
--- a/core/modules/migrate/tests/src/Functional/process/DownloadFunctionalTest.php
+++ b/core/modules/migrate/tests/src/Functional/process/DownloadFunctionalTest.php
@@ -65,7 +65,7 @@ public function testExceptionThrow() {
     $this->assertNull($map_row['destid1']);
 
     // Check that a message with the thrown exception has been logged.
-    $messages = $id_map_plugin->getMessages(['url' => $invalid_url])->fetchAll();
+    $messages = $id_map_plugin->getMessageIterator(['url' => $invalid_url])->fetchAll();
     $this->assertCount(1, $messages);
     $message = reset($messages);
     $this->assertEquals("Cannot read from non-readable stream ($invalid_url)", $message->message);
diff --git a/core/modules/migrate/tests/src/Kernel/MigrateMessageTest.php b/core/modules/migrate/tests/src/Kernel/MigrateMessageTest.php
index a4cebef64d..8399232852 100644
--- a/core/modules/migrate/tests/src/Kernel/MigrateMessageTest.php
+++ b/core/modules/migrate/tests/src/Kernel/MigrateMessageTest.php
@@ -98,12 +98,12 @@ public function testMessagesTeed() {
   }
 
   /**
-   * Tests the return value of getMessages().
+   * Tests the return value of getMessageIterator().
    *
    * This method returns an iterator of StdClass objects. Check that these
    * objects have the expected keys.
    */
-  public function testGetMessages() {
+  public function testGetMessageIterator() {
     $expected_message = (object) [
       'src_name' => 'source_message',
       'dest_config_name' => NULL,
@@ -115,7 +115,7 @@ public function testGetMessages() {
     $executable = new MigrateExecutable($this->migration, $this);
     $executable->import();
     $count = 0;
-    foreach ($this->migration->getIdMap()->getMessages() as $message) {
+    foreach ($this->migration->getIdMap()->getMessageIterator() as $message) {
       ++$count;
       $this->assertEqual($message, $expected_message);
     }
diff --git a/core/modules/migrate/tests/src/Kernel/MigrateSkipRowTest.php b/core/modules/migrate/tests/src/Kernel/MigrateSkipRowTest.php
index dd42f252fd..8c5e01e513 100644
--- a/core/modules/migrate/tests/src/Kernel/MigrateSkipRowTest.php
+++ b/core/modules/migrate/tests/src/Kernel/MigrateSkipRowTest.php
@@ -59,14 +59,14 @@ public function testPrepareRowSkip() {
     $map_row = $id_map_plugin->getRowBySource(['id' => 1]);
     $this->assertEqual(MigrateIdMapInterface::STATUS_IGNORED, $map_row['source_row_status']);
     // Check that no message has been logged for the first exception.
-    $messages = $id_map_plugin->getMessages(['id' => 1])->fetchAll();
+    $messages = $id_map_plugin->getMessageIterator(['id' => 1])->fetchAll();
     $this->assertEmpty($messages);
 
     // The second row is not recorded in the map.
     $map_row = $id_map_plugin->getRowBySource(['id' => 2]);
     $this->assertFalse($map_row);
     // Check that the correct message has been logged for the second exception.
-    $messages = $id_map_plugin->getMessages(['id' => 2])->fetchAll();
+    $messages = $id_map_plugin->getMessageIterator(['id' => 2])->fetchAll();
     $this->assertCount(1, $messages);
     $message = reset($messages);
     $this->assertEquals('skip_and_dont_record message', $message->message);
diff --git a/core/modules/migrate/tests/src/Unit/MigrateNullIdMapTest.php b/core/modules/migrate/tests/src/Unit/MigrateNullIdMapTest.php
deleted file mode 100644
index eba4bbb4c2..0000000000
--- a/core/modules/migrate/tests/src/Unit/MigrateNullIdMapTest.php
+++ /dev/null
@@ -1,26 +0,0 @@
-<?php
-
-namespace Drupal\Tests\migrate\Unit;
-
-use Drupal\migrate\Plugin\migrate\id_map\NullIdMap;
-
-/**
- * Tests the NULL ID map plugin.
- *
- * @group migrate
- */
-class MigrateNullIdMapTest extends MigrateTestCase {
-
-  /**
-   * Tests the NULL ID map get message iterator method.
-   *
-   * @group legacy
-   *
-   * @expectedDeprecation getMessageIterator() is deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. Use getMessages() instead. See https://www.drupal.org/node/3060969
-   */
-  public function testGetMessageIterator() {
-    $id_map = new NullIdMap([], 'null', NULL);
-    $id_map->getMessageIterator();
-  }
-
-}
diff --git a/core/modules/migrate/tests/src/Unit/MigrateSqlIdMapTest.php b/core/modules/migrate/tests/src/Unit/MigrateSqlIdMapTest.php
index 098603ebcc..249c26ee8f 100644
--- a/core/modules/migrate/tests/src/Unit/MigrateSqlIdMapTest.php
+++ b/core/modules/migrate/tests/src/Unit/MigrateSqlIdMapTest.php
@@ -312,7 +312,7 @@ public function testMessageSave() {
       $id_map->saveMessage(['source_id_property' => $key], $message, $original_value['level']);
     }
 
-    foreach ($id_map->getMessages() as $message_row) {
+    foreach ($id_map->getMessageIterator() as $message_row) {
       $key = $message_row->source_ids_hash;
       $this->assertEquals($expected_results[$key]['message'], $message_row->message);
       $this->assertEquals($expected_results[$key]['level'], $message_row->level);
@@ -321,7 +321,7 @@ public function testMessageSave() {
     // Insert with default level.
     $message_default = 'Hello world default.';
     $id_map->saveMessage(['source_id_property' => 5], $message_default);
-    $messages = $id_map->getMessages(['source_id_property' => 5]);
+    $messages = $id_map->getMessageIterator(['source_id_property' => 5]);
     $count = 0;
     foreach ($messages as $key => $message_row) {
       $count = 1;
@@ -331,7 +331,7 @@ public function testMessageSave() {
     $this->assertEquals($count, 1);
 
     // Retrieve messages with a specific level.
-    $messages = $id_map->getMessages([], MigrationInterface::MESSAGE_WARNING);
+    $messages = $id_map->getMessageIterator([], MigrationInterface::MESSAGE_WARNING);
     $count = 0;
     foreach ($messages as $key => $message_row) {
       $count = 1;
@@ -340,17 +340,6 @@ public function testMessageSave() {
     $this->assertEquals($count, 1);
   }
 
-  /**
-   * Tests the SQL ID map get message iterator method.
-   *
-   * @group legacy
-   *
-   * @expectedDeprecation getMessageIterator() is deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. Use getMessages() instead. See https://www.drupal.org/node/3060969
-   */
-  public function testGetMessageIterator() {
-    $this->getIdMap()->getMessageIterator();
-  }
-
   /**
    * Tests the getRowBySource method.
    */
diff --git a/core/modules/system/tests/modules/entity_test/entity_test.services.yml b/core/modules/system/tests/modules/entity_test/entity_test.services.yml
index 212de69c18..75e1bf33ce 100644
--- a/core/modules/system/tests/modules/entity_test/entity_test.services.yml
+++ b/core/modules/system/tests/modules/entity_test/entity_test.services.yml
@@ -1,7 +1,7 @@
 services:
   entity_test.definition.subscriber:
     class: Drupal\entity_test\EntityTestDefinitionSubscriber
-    arguments: ['@state', '@entity.last_installed_schema.repository', '@entity_type.manager', '@entity_field.manager']
+    arguments: ['@state']
     tags:
       - { name: event_subscriber }
   cache_context.entity_test_view_grants:
diff --git a/core/modules/system/tests/modules/entity_test/src/EntityTestDefinitionSubscriber.php b/core/modules/system/tests/modules/entity_test/src/EntityTestDefinitionSubscriber.php
index e96ebd4066..6cdceb6d9c 100644
--- a/core/modules/system/tests/modules/entity_test/src/EntityTestDefinitionSubscriber.php
+++ b/core/modules/system/tests/modules/entity_test/src/EntityTestDefinitionSubscriber.php
@@ -2,13 +2,10 @@
 
 namespace Drupal\entity_test;
 
-use Drupal\Core\Entity\EntityFieldManagerInterface;
-use Drupal\Core\Entity\EntityLastInstalledSchemaRepositoryInterface;
 use Drupal\Core\Entity\EntityTypeEvents;
 use Drupal\Core\Entity\EntityTypeEventSubscriberTrait;
 use Drupal\Core\Entity\EntityTypeInterface;
 use Drupal\Core\Entity\EntityTypeListenerInterface;
-use Drupal\Core\Entity\EntityTypeManagerInterface;
 use Drupal\Core\Field\FieldStorageDefinitionEvents;
 use Drupal\Core\Field\FieldStorageDefinitionEventSubscriberTrait;
 use Drupal\Core\Field\FieldStorageDefinitionInterface;
@@ -31,27 +28,6 @@ class EntityTestDefinitionSubscriber implements EventSubscriberInterface, Entity
    */
   protected $state;
 
-  /**
-   * The last installed schema repository.
-   *
-   * @var \Drupal\Core\Entity\EntityLastInstalledSchemaRepositoryInterface
-   */
-  protected $entityLastInstalledSchemaRepository;
-
-  /**
-   * The entity type manager.
-   *
-   * @var \Drupal\Core\Entity\EntityTypeManagerInterface
-   */
-  protected $entityTypeManager;
-
-  /**
-   * The entity field manager.
-   *
-   * @var \Drupal\Core\Entity\EntityFieldManagerInterface
-   */
-  protected $entityFieldManager;
-
   /**
    * Flag determining whether events should be tracked.
    *
@@ -59,21 +35,11 @@ class EntityTestDefinitionSubscriber implements EventSubscriberInterface, Entity
    */
   protected $trackEvents = FALSE;
 
-  /**
-   * Determines whether the live definitions should be updated.
-   *
-   * @var bool
-   */
-  protected $updateLiveDefinitions = FALSE;
-
   /**
    * {@inheritdoc}
    */
-  public function __construct(StateInterface $state, EntityLastInstalledSchemaRepositoryInterface $entity_last_installed_schema_repository, EntityTypeManagerInterface $entity_type_manager, EntityFieldManagerInterface $entity_field_manager) {
+  public function __construct(StateInterface $state) {
     $this->state = $state;
-    $this->entityLastInstalledSchemaRepository = $entity_last_installed_schema_repository;
-    $this->entityTypeManager = $entity_type_manager;
-    $this->entityFieldManager = $entity_field_manager;
   }
 
   /**
@@ -87,38 +53,14 @@ public static function getSubscribedEvents() {
    * {@inheritdoc}
    */
   public function onEntityTypeCreate(EntityTypeInterface $entity_type) {
-    if ($this->entityLastInstalledSchemaRepository->getLastInstalledDefinition($entity_type->id())) {
-      $this->storeDefinitionUpdate(EntityTypeEvents::CREATE);
-    }
     $this->storeEvent(EntityTypeEvents::CREATE);
-
-    // Retrieve the live entity type definition in order to warm the static
-    // cache and then insert the new entity type definition, so we can test that
-    // the cache doesn't get stale after the event has fired.
-    if ($this->updateLiveDefinitions) {
-      $this->entityTypeManager->getDefinition($entity_type->id());
-      $this->state->set('entity_test_rev.entity_type', $entity_type);
-    }
   }
 
   /**
    * {@inheritdoc}
    */
   public function onEntityTypeUpdate(EntityTypeInterface $entity_type, EntityTypeInterface $original) {
-    $last_installed_definition = $this->entityLastInstalledSchemaRepository->getLastInstalledDefinition($entity_type->id());
-    if ((string) $last_installed_definition->getLabel() === 'Updated entity test rev') {
-      $this->storeDefinitionUpdate(EntityTypeEvents::UPDATE);
-    }
-
     $this->storeEvent(EntityTypeEvents::UPDATE);
-
-    // Retrieve the live entity type definition in order to warm the static
-    // cache and then insert the new entity type definition, so we can test that
-    // the cache doesn't get stale after the event has fired.
-    if ($this->updateLiveDefinitions) {
-      $this->entityTypeManager->getDefinition($entity_type->id());
-      $this->state->set('entity_test_rev.entity_type', $entity_type);
-    }
   }
 
   /**
@@ -132,73 +74,28 @@ public function onFieldableEntityTypeUpdate(EntityTypeInterface $entity_type, En
    * {@inheritdoc}
    */
   public function onEntityTypeDelete(EntityTypeInterface $entity_type) {
-    if (!$this->entityLastInstalledSchemaRepository->getLastInstalledDefinition($entity_type->id())) {
-      $this->storeDefinitionUpdate(EntityTypeEvents::DELETE);
-    }
     $this->storeEvent(EntityTypeEvents::DELETE);
-
-    // Retrieve the live entity type definition in order to warm the static
-    // cache and then delete the new entity type definition, so we can test that
-    // the cache doesn't get stale after the event has fired.
-    if ($this->updateLiveDefinitions) {
-      $this->entityTypeManager->getDefinition($entity_type->id());
-      $this->state->set('entity_test_rev.entity_type', '');
-    }
   }
 
   /**
    * {@inheritdoc}
    */
   public function onFieldStorageDefinitionCreate(FieldStorageDefinitionInterface $storage_definition) {
-    if (isset($this->entityLastInstalledSchemaRepository->getLastInstalledFieldStorageDefinitions($storage_definition->getTargetEntityTypeId())[$storage_definition->getName()])) {
-      $this->storeDefinitionUpdate(FieldStorageDefinitionEvents::CREATE);
-    }
     $this->storeEvent(FieldStorageDefinitionEvents::CREATE);
-
-    // Retrieve the live field storage definitions in order to warm the static
-    // cache and then insert the new storage definition, so we can test that the
-    // cache doesn't get stale after the event has fired.
-    if ($this->updateLiveDefinitions) {
-      $this->entityFieldManager->getFieldStorageDefinitions($storage_definition->getTargetEntityTypeId());
-      $this->state->set('entity_test_rev.additional_base_field_definitions', [$storage_definition->getName() => $storage_definition]);
-    }
   }
 
   /**
    * {@inheritdoc}
    */
   public function onFieldStorageDefinitionUpdate(FieldStorageDefinitionInterface $storage_definition, FieldStorageDefinitionInterface $original) {
-    $last_installed_definition = $this->entityLastInstalledSchemaRepository->getLastInstalledFieldStorageDefinitions($storage_definition->getTargetEntityTypeId())[$storage_definition->getName()];
-    if ((string) $last_installed_definition->getLabel() === 'Updated field storage test') {
-      $this->storeDefinitionUpdate(FieldStorageDefinitionEvents::UPDATE);
-    }
     $this->storeEvent(FieldStorageDefinitionEvents::UPDATE);
-
-    // Retrieve the live field storage definitions in order to warm the static
-    // cache and then insert the new storage definition, so we can test that the
-    // cache doesn't get stale after the event has fired.
-    if ($this->updateLiveDefinitions) {
-      $this->entityFieldManager->getFieldStorageDefinitions($storage_definition->getTargetEntityTypeId());
-      $this->state->set('entity_test_rev.additional_base_field_definitions', [$storage_definition->getName() => $storage_definition]);
-    }
   }
 
   /**
    * {@inheritdoc}
    */
   public function onFieldStorageDefinitionDelete(FieldStorageDefinitionInterface $storage_definition) {
-    if (!isset($this->entityLastInstalledSchemaRepository->getLastInstalledFieldStorageDefinitions($storage_definition->getTargetEntityTypeId())[$storage_definition->getName()])) {
-      $this->storeDefinitionUpdate(FieldStorageDefinitionEvents::DELETE);
-    }
     $this->storeEvent(FieldStorageDefinitionEvents::DELETE);
-
-    // Retrieve the live field storage definitions in order to warm the static
-    // cache and then remove the new storage definition, so we can test that the
-    // cache doesn't get stale after the event has fired.
-    if ($this->updateLiveDefinitions) {
-      $this->entityFieldManager->getFieldStorageDefinitions($storage_definition->getTargetEntityTypeId());
-      $this->state->set('entity_test_rev.additional_base_field_definitions', []);
-    }
   }
 
   /**
@@ -208,13 +105,6 @@ public function enableEventTracking() {
     $this->trackEvents = TRUE;
   }
 
-  /**
-   * Enables live definition updates.
-   */
-  public function enableLiveDefinitionUpdates() {
-    $this->updateLiveDefinitions = TRUE;
-  }
-
   /**
    * Checks whether an event has been dispatched.
    *
@@ -240,30 +130,4 @@ protected function storeEvent($event_name) {
     }
   }
 
-  /**
-   * Checks whether the installed definitions were updated before the event.
-   *
-   * @param string $event_name
-   *   The event name.
-   *
-   * @return bool
-   *   TRUE if the last installed entity type of field storage definitions have
-   *   been updated before the event was fired, FALSE otherwise.
-   */
-  public function hasDefinitionBeenUpdated($event_name) {
-    return (bool) $this->state->get($event_name . '_updated_definition');
-  }
-
-  /**
-   * Stores the installed definition state for the specified event.
-   *
-   * @param string $event_name
-   *   The event name.
-   */
-  protected function storeDefinitionUpdate($event_name) {
-    if ($this->trackEvents) {
-      $this->state->set($event_name . '_updated_definition', TRUE);
-    }
-  }
-
 }
diff --git a/core/modules/system/tests/modules/entity_test_update/entity_test_update.services.yml b/core/modules/system/tests/modules/entity_test_update/entity_test_update.services.yml
deleted file mode 100644
index 45d1606daa..0000000000
--- a/core/modules/system/tests/modules/entity_test_update/entity_test_update.services.yml
+++ /dev/null
@@ -1,6 +0,0 @@
-services:
-  entity_test_update.entity_schema_listener:
-    class: Drupal\entity_test_update\EventSubscriber\EntitySchemaSubscriber
-    arguments: ['@entity.definition_update_manager', '@state']
-    tags:
-      - { name: 'event_subscriber' }
diff --git a/core/modules/system/tests/modules/entity_test_update/src/EventSubscriber/EntitySchemaSubscriber.php b/core/modules/system/tests/modules/entity_test_update/src/EventSubscriber/EntitySchemaSubscriber.php
deleted file mode 100644
index 37dac651e2..0000000000
--- a/core/modules/system/tests/modules/entity_test_update/src/EventSubscriber/EntitySchemaSubscriber.php
+++ /dev/null
@@ -1,74 +0,0 @@
-<?php
-
-namespace Drupal\entity_test_update\EventSubscriber;
-
-use Drupal\Core\Entity\EntityDefinitionUpdateManagerInterface;
-use Drupal\Core\Entity\EntityTypeEventSubscriberTrait;
-use Drupal\Core\Entity\EntityTypeInterface;
-use Drupal\Core\Entity\EntityTypeListenerInterface;
-use Drupal\Core\Field\BaseFieldDefinition;
-use Drupal\Core\State\StateInterface;
-use Drupal\Core\StringTranslation\TranslatableMarkup;
-use Symfony\Component\EventDispatcher\EventSubscriberInterface;
-
-/**
- * Defines a class for listening to entity schema changes.
- */
-class EntitySchemaSubscriber implements EntityTypeListenerInterface, EventSubscriberInterface {
-
-  use EntityTypeEventSubscriberTrait;
-
-  /**
-   * The entity definition update manager.
-   *
-   * @var \Drupal\Core\Entity\EntityDefinitionUpdateManagerInterface
-   */
-  protected $entityDefinitionUpdateManager;
-
-  /**
-   * The state service.
-   *
-   * @var \Drupal\Core\State\StateInterface
-   */
-  protected $state;
-
-  /**
-   * Constructs a new EntitySchemaSubscriber.
-   *
-   * @param \Drupal\Core\Entity\EntityDefinitionUpdateManagerInterface $entityDefinitionUpdateManager
-   *   The entity definition update manager.
-   * @param \Drupal\Core\State\StateInterface $state
-   *   The state service.
-   */
-  public function __construct(EntityDefinitionUpdateManagerInterface $entityDefinitionUpdateManager, StateInterface $state) {
-    $this->entityDefinitionUpdateManager = $entityDefinitionUpdateManager;
-    $this->state = $state;
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public static function getSubscribedEvents() {
-    return static::getEntityTypeEvents();
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function onEntityTypeUpdate(EntityTypeInterface $entity_type, EntityTypeInterface $original) {
-    // Only add the new base field when a test needs it.
-    if (!$this->state->get('entity_test_update.install_new_base_field_during_update', FALSE)) {
-      return;
-    }
-
-    // Add a new base field when the entity type is updated.
-    $definitions = $this->state->get('entity_test_update.additional_base_field_definitions', []);
-    $definitions['new_base_field'] = BaseFieldDefinition::create('string')
-      ->setName('new_base_field')
-      ->setLabel(new TranslatableMarkup('A new base field'));
-    $this->state->set('entity_test_update.additional_base_field_definitions', $definitions);
-
-    $this->entityDefinitionUpdateManager->installFieldStorageDefinition('new_base_field', 'entity_test_update', 'entity_test_update', $definitions['new_base_field']);
-  }
-
-}
diff --git a/core/modules/views/src/Controller/ViewAjaxController.php b/core/modules/views/src/Controller/ViewAjaxController.php
index 8b7d115fa5..1bc6e3e367 100644
--- a/core/modules/views/src/Controller/ViewAjaxController.php
+++ b/core/modules/views/src/Controller/ViewAjaxController.php
@@ -160,7 +160,7 @@ public function ajaxView(Request $request) {
         $response->setView($view);
         // Fix the current path for paging.
         if (!empty($path)) {
-          $this->currentPath->setPath('/' . ltrim($path, '/'), $request);
+          $this->currentPath->setPath('/' . $path, $request);
         }
 
         // Add all POST data, because AJAX is always a post and many things,
diff --git a/core/modules/views/src/Form/ViewsExposedForm.php b/core/modules/views/src/Form/ViewsExposedForm.php
index 7e92378ae3..e9d5fa4f41 100644
--- a/core/modules/views/src/Form/ViewsExposedForm.php
+++ b/core/modules/views/src/Form/ViewsExposedForm.php
@@ -5,7 +5,6 @@
 use Drupal\Component\Utility\Html;
 use Drupal\Core\Form\FormBase;
 use Drupal\Core\Form\FormStateInterface;
-use Drupal\Core\Path\CurrentPathStack;
 use Drupal\Core\Render\Element\Checkboxes;
 use Drupal\Core\Url;
 use Drupal\views\ExposedFormCache;
@@ -25,39 +24,21 @@ class ViewsExposedForm extends FormBase {
    */
   protected $exposedFormCache;
 
-
-  /**
-   * The current path stack.
-   *
-   * @var \Drupal\Core\Path\CurrentPathStack
-   */
-  protected $currentPathStack;
-
   /**
    * Constructs a new ViewsExposedForm
    *
    * @param \Drupal\views\ExposedFormCache $exposed_form_cache
    *   The exposed form cache.
-   * @param \Drupal\Core\Path\CurrentPathStack $current_path_stack
-   *   The current path stack.
    */
-  public function __construct(ExposedFormCache $exposed_form_cache, CurrentPathStack $current_path_stack = NULL) {
+  public function __construct(ExposedFormCache $exposed_form_cache) {
     $this->exposedFormCache = $exposed_form_cache;
-    if ($current_path_stack === NULL) {
-      @trigger_error('The path.current service must be passed to ViewsExposedForm::__construct(), it is required before Drupal 9.0.0. See https://www.drupal.org/node/3066604', E_USER_DEPRECATED);
-      $current_path_stack = \Drupal::service('path.current');
-    }
-    $this->currentPathStack = $current_path_stack;
   }
 
   /**
    * {@inheritdoc}
    */
   public static function create(ContainerInterface $container) {
-    return new static(
-      $container->get('views.exposed_form_cache'),
-      $container->get('path.current')
-    );
+    return new static($container->get('views.exposed_form_cache'));
   }
 
   /**
@@ -132,21 +113,7 @@ public function buildForm(array $form, FormStateInterface $form_state) {
       '#id' => Html::getUniqueId('edit-submit-' . $view->storage->id()),
     ];
 
-    if (!$view->hasUrl()) {
-      // On any non views.ajax route, use the current route for the form action.
-      if ($this->getRouteMatch()->getRouteName() !== 'views.ajax') {
-        $form_action = Url::fromRoute('<current>')->toString();
-      }
-      else {
-        // On the views.ajax route, set the action to the page we were on.
-        $form_action = Url::fromUserInput($this->currentPathStack->getPath())->toString();
-      }
-    }
-    else {
-      $form_action = $view->getUrl()->toString();
-    }
-
-    $form['#action'] = $form_action;
+    $form['#action'] = $view->hasUrl() ? $view->getUrl()->toString() : Url::fromRoute('<current>')->toString();
     $form['#theme'] = $view->buildThemeFunctions('views_exposed_form');
     $form['#id'] = Html::cleanCssIdentifier('views_exposed_form-' . $view->storage->id() . '-' . $display['id']);
 
diff --git a/core/modules/views/tests/modules/views_test_config/test_views/views.view.test_block_exposed_ajax.yml b/core/modules/views/tests/modules/views_test_config/test_views/views.view.test_block_exposed_ajax.yml
deleted file mode 100644
index 0c3544621f..0000000000
--- a/core/modules/views/tests/modules/views_test_config/test_views/views.view.test_block_exposed_ajax.yml
+++ /dev/null
@@ -1,80 +0,0 @@
-langcode: en
-status: true
-dependencies:
-  config:
-    - core.entity_view_mode.node.teaser
-  module:
-    - node
-id: test_block_exposed_ajax
-label: ''
-module: views
-description: ''
-tag: ''
-base_table: node_field_data
-base_field: nid
-core: '8'
-display:
-  default:
-    display_options:
-      access:
-        type: none
-      cache:
-        type: tag
-      exposed_form:
-        options:
-          submit_button: Apply
-          reset_button: true
-        type: basic
-      filters:
-        type:
-          expose:
-            identifier: type
-            label: 'Content: Type'
-            operator_id: type_op
-            reduce: false
-          exposed: true
-          field: type
-          id: type
-          table: node_field_data
-          plugin_id: in_operator
-          entity_type: node
-          entity_field: type
-      pager:
-        type: full
-      query:
-        options:
-          query_comment: ''
-        type: views_query
-      style:
-        type: default
-      row:
-        type: 'entity:node'
-      display_extenders: {  }
-      use_ajax: true
-    display_plugin: default
-    display_title: Master
-    id: default
-    position: 0
-    cache_metadata:
-      max-age: -1
-      contexts:
-        - 'languages:language_interface'
-        - url
-        - url.query_args
-        - 'user.node_grants:view'
-      tags: {  }
-  block_1:
-    display_plugin: block
-    id: block_1
-    display_title: Block
-    position: 2
-    display_options:
-      display_extenders: {  }
-    cache_metadata:
-      max-age: -1
-      contexts:
-        - 'languages:language_interface'
-        - url
-        - url.query_args
-        - 'user.node_grants:view'
-      tags: {  }
diff --git a/core/modules/views/tests/modules/views_test_config/test_views/views.view.test_block_exposed_ajax_with_page.yml b/core/modules/views/tests/modules/views_test_config/test_views/views.view.test_block_exposed_ajax_with_page.yml
deleted file mode 100644
index 3dff996b9e..0000000000
--- a/core/modules/views/tests/modules/views_test_config/test_views/views.view.test_block_exposed_ajax_with_page.yml
+++ /dev/null
@@ -1,96 +0,0 @@
-langcode: en
-status: true
-dependencies:
-  config:
-    - core.entity_view_mode.node.teaser
-  module:
-    - node
-id: test_block_exposed_ajax_with_page
-label: ''
-module: views
-description: ''
-tag: ''
-base_table: node_field_data
-base_field: nid
-core: '8'
-display:
-  default:
-    display_options:
-      access:
-        type: none
-      cache:
-        type: tag
-      exposed_form:
-        options:
-          submit_button: Apply
-          reset_button: true
-        type: basic
-      filters:
-        type:
-          expose:
-            identifier: type
-            label: 'Content: Type'
-            operator_id: type_op
-            reduce: false
-          exposed: true
-          field: type
-          id: type
-          table: node_field_data
-          plugin_id: in_operator
-          entity_type: node
-          entity_field: type
-      pager:
-        type: full
-      query:
-        options:
-          query_comment: ''
-        type: views_query
-      style:
-        type: default
-      row:
-        type: 'entity:node'
-      display_extenders: {  }
-      use_ajax: true
-    display_plugin: default
-    display_title: Master
-    id: default
-    position: 0
-    cache_metadata:
-      max-age: -1
-      contexts:
-        - 'languages:language_interface'
-        - url
-        - url.query_args
-        - 'user.node_grants:view'
-      tags: {  }
-  block_1:
-    display_plugin: block
-    id: block_1
-    display_title: Block
-    position: 2
-    display_options:
-      display_extenders: {  }
-    cache_metadata:
-      max-age: -1
-      contexts:
-        - 'languages:language_interface'
-        - url
-        - url.query_args
-        - 'user.node_grants:view'
-      tags: {  }
-  page_1:
-    display_plugin: page
-    id: page_1
-    display_title: Page
-    position: 2
-    display_options:
-      display_extenders: {  }
-      path: some-path
-    cache_metadata:
-      max-age: -1
-      contexts:
-        - 'languages:language_interface'
-        - url
-        - url.query_args
-        - 'user.node_grants:view'
-      tags: {  }
diff --git a/core/modules/views/tests/src/FunctionalJavascript/BlockExposedFilterAJAXTest.php b/core/modules/views/tests/src/FunctionalJavascript/BlockExposedFilterAJAXTest.php
deleted file mode 100644
index c483ba0331..0000000000
--- a/core/modules/views/tests/src/FunctionalJavascript/BlockExposedFilterAJAXTest.php
+++ /dev/null
@@ -1,91 +0,0 @@
-<?php
-
-namespace Drupal\Tests\views\FunctionalJavascript;
-
-use Drupal\FunctionalJavascriptTests\WebDriverTestBase;
-use Drupal\Tests\node\Traits\ContentTypeCreationTrait;
-use Drupal\Tests\node\Traits\NodeCreationTrait;
-use Drupal\views\Tests\ViewTestData;
-
-/**
- * Tests the exposed filter ajax functionality in a block.
- *
- * @group views
- */
-class BlockExposedFilterAJAXTest extends WebDriverTestBase {
-
-  use ContentTypeCreationTrait;
-  use NodeCreationTrait;
-
-  /**
-   * {@inheritdoc}
-   */
-  public static $modules = ['node', 'views', 'block', 'views_test_config'];
-
-  public static $testViews = ['test_block_exposed_ajax', 'test_block_exposed_ajax_with_page'];
-
-  /**
-   * {@inheritdoc}
-   */
-  public function setUp() {
-    parent::setUp();
-    ViewTestData::createTestViews(self::class, ['views_test_config']);
-    $this->createContentType(['type' => 'page']);
-    $this->createContentType(['type' => 'article']);
-    $this->createNode(['title' => 'Page A']);
-    $this->createNode(['title' => 'Page B']);
-    $this->createNode(['title' => 'Article A', 'type' => 'article']);
-
-    $this->drupalLogin($this->drupalCreateUser([
-      'access content',
-    ]));
-  }
-
-  /**
-   * Tests if exposed filtering and reset works with a views block and ajax.
-   */
-  public function testExposedFilteringAndReset() {
-    $node = $this->createNode();
-    $block = $this->drupalPlaceBlock('views_block:test_block_exposed_ajax-block_1');
-    $this->drupalGet($node->toUrl());
-
-    $page = $this->getSession()->getPage();
-
-    // Ensure that the Content we're testing for is present.
-    $html = $page->getHtml();
-    $this->assertContains('Page A', $html);
-    $this->assertContains('Page B', $html);
-    $this->assertContains('Article A', $html);
-
-    // Filter by page type.
-    $this->submitForm(['type' => 'page'], t('Apply'));
-    $this->assertSession()->waitForElementRemoved('xpath', '//*[text()="Article A"]');
-
-    // Verify that only the page nodes are present.
-    $html = $page->getHtml();
-    $this->assertContains('Page A', $html);
-    $this->assertContains('Page B', $html);
-    $this->assertNotContains('Article A', $html);
-
-    // Reset the form.
-    $this->submitForm([], t('Reset'));
-    // Assert we are still on the node page.
-    $html = $page->getHtml();
-    // Repeat the original tests.
-    $this->assertContains('Page A', $html);
-    $this->assertContains('Page B', $html);
-    $this->assertContains('Article A', $html);
-    $this->assertSession()->addressEquals('node/' . $node->id());
-
-    $block->delete();
-    // Do the same test with a block that has a page display to test the user
-    // is redirected to the page display.
-    $this->drupalPlaceBlock('views_block:test_block_exposed_ajax_with_page-block_1');
-    $this->drupalGet($node->toUrl());
-    $this->submitForm(['type' => 'page'], t('Apply'));
-    $this->assertSession()->waitForElementRemoved('xpath', '//*[text()="Article A"]');
-    $this->submitForm([], t('Reset'));
-    $this->assertSession()->addressEquals('some-path');
-  }
-
-}
diff --git a/core/modules/views/tests/src/Kernel/Handler/FieldCounterTest.php b/core/modules/views/tests/src/Kernel/Handler/FieldCounterTest.php
index ed669667d4..7300606f23 100644
--- a/core/modules/views/tests/src/Kernel/Handler/FieldCounterTest.php
+++ b/core/modules/views/tests/src/Kernel/Handler/FieldCounterTest.php
@@ -10,6 +10,9 @@
  * Tests the Drupal\views\Plugin\views\field\Counter handler.
  *
  * @group views
+ *
+ * @todo Write tests for pager in
+ *   https://www.drupal.org/project/drupal/issues/3063179
  */
 class FieldCounterTest extends ViewsKernelTestBase {
 
@@ -85,93 +88,4 @@ public function testSimple() {
     $this->assertEqual($counter, (string) $expected_number, new FormattableMarkup('Make sure the expected number (@expected) patches with the rendered number (@counter)', ['@expected' => $expected_number, '@counter' => $counter]));
   }
 
-  /**
-   * Tests the counter field when using a pager.
-   */
-  public function testPager() {
-    $view = Views::getView('test_view');
-    $view->setDisplay();
-    $view->displayHandlers->get('default')->overrideOption('fields', [
-      'counter' => [
-        'id' => 'counter',
-        'table' => 'views',
-        'field' => 'counter',
-        'relationship' => 'none',
-      ],
-      'name' => [
-        'id' => 'name',
-        'table' => 'views_test_data',
-        'field' => 'name',
-        'relationship' => 'none',
-      ],
-    ]);
-    $view->displayHandlers->get('default')->setOption('pager', [
-      'type' => 'mini',
-      'options' => ['items_per_page' => 1],
-    ]);
-
-    $view->preview();
-
-    $counter = $view->style_plugin->getField(0, 'counter');
-    $this->assertEquals('1', $counter);
-    $view->destroy();
-
-    // Go the the second page.
-    $view->setCurrentPage(1);
-    $view->preview();
-
-    $counter = $view->style_plugin->getField(0, 'counter');
-    $this->assertEquals('2', $counter);
-    $view->destroy();
-
-    // Go the the third page.
-    $view->setCurrentPage(2);
-    $view->preview();
-
-    $counter = $view->style_plugin->getField(0, 'counter');
-    $this->assertEquals('3', $counter);
-
-    $view->destroy();
-
-    // Test using the counter start option.
-    $counter_start = 1000000;
-    $view->setDisplay();
-    $view->displayHandlers->get('default')->overrideOption('fields', [
-      'counter' => [
-        'id' => 'counter',
-        'table' => 'views',
-        'field' => 'counter',
-        'relationship' => 'none',
-        'counter_start' => $counter_start,
-      ],
-      'name' => [
-        'id' => 'name',
-        'table' => 'views_test_data',
-        'field' => 'name',
-        'relationship' => 'none',
-      ],
-    ]);
-
-    $view->preview();
-
-    $counter = $view->style_plugin->getField(0, 'counter');
-    $this->assertEquals($counter_start, $counter);
-    $view->destroy();
-
-    // Go the the second page.
-    $view->setCurrentPage(1);
-    $view->preview();
-
-    $counter = $view->style_plugin->getField(0, 'counter');
-    $this->assertEquals($counter_start + 1, $counter);
-    $view->destroy();
-
-    // Go the the third page.
-    $view->setCurrentPage(2);
-    $view->preview();
-
-    $counter = $view->style_plugin->getField(0, 'counter');
-    $this->assertEquals($counter_start + 2, $counter);
-  }
-
 }
diff --git a/core/modules/views/views.module b/core/modules/views/views.module
index 744c966525..f46a2604fb 100644
--- a/core/modules/views/views.module
+++ b/core/modules/views/views.module
@@ -59,7 +59,7 @@ function views_views_pre_render($view) {
           'view_name' => $view->storage->id(),
           'view_display_id' => $view->current_display,
           'view_args' => Html::escape(implode('/', $view->args)),
-          'view_path' => Html::escape(\Drupal::service('path.current')->getPath()),
+          'view_path' => Html::escape(Url::fromRoute('<current>')->toString()),
           'view_base_path' => $view->getPath(),
           'view_dom_id' => $view->dom_id,
           // To fit multiple views on a page, the programmer may have
diff --git a/core/tests/Drupal/FunctionalJavascriptTests/JSWebAssert.php b/core/tests/Drupal/FunctionalJavascriptTests/JSWebAssert.php
index d52cf43181..e72bda06e2 100644
--- a/core/tests/Drupal/FunctionalJavascriptTests/JSWebAssert.php
+++ b/core/tests/Drupal/FunctionalJavascriptTests/JSWebAssert.php
@@ -71,32 +71,6 @@ public function waitForElement($selector, $locator, $timeout = 10000) {
     return $result;
   }
 
-  /**
-   * Looks for the specified selector and returns TRUE when it is unavailable.
-   *
-   * @param string $selector
-   *   The selector engine name. See ElementInterface::findAll() for the
-   *   supported selectors.
-   * @param string|array $locator
-   *   The selector locator.
-   * @param int $timeout
-   *   (Optional) Timeout in milliseconds, defaults to 10000.
-   *
-   * @return bool
-   *   TRUE if not found, FALSE if found.
-   *
-   * @see \Behat\Mink\Element\ElementInterface::findAll()
-   */
-  public function waitForElementRemoved($selector, $locator, $timeout = 10000) {
-    $page = $this->session->getPage();
-
-    $result = $page->waitFor($timeout / 1000, function () use ($page, $selector, $locator) {
-      return !$page->find($selector, $locator);
-    });
-
-    return $result;
-  }
-
   /**
    * Waits for the specified selector and returns it when available and visible.
    *
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateTest.php
index 9afc0eaf30..76b63efef1 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateTest.php
@@ -14,8 +14,6 @@
 use Drupal\Core\Field\FieldException;
 use Drupal\Core\Field\FieldStorageDefinitionEvents;
 use Drupal\Core\Language\LanguageInterface;
-use Drupal\Core\StringTranslation\TranslatableMarkup;
-use Drupal\entity_test\FieldStorageDefinition;
 use Drupal\entity_test_update\Entity\EntityTestUpdate;
 use Drupal\Tests\system\Functional\Entity\Traits\EntityDefinitionTestTrait;
 
@@ -37,13 +35,6 @@ class EntityDefinitionUpdateTest extends EntityKernelTestBase {
    */
   protected $entityDefinitionUpdateManager;
 
-  /**
-   * The entity field manager.
-   *
-   * @var \Drupal\Core\Entity\EntityFieldManagerInterface
-   */
-  protected $entityFieldManager;
-
   /**
    * The database connection.
    *
@@ -64,7 +55,6 @@ class EntityDefinitionUpdateTest extends EntityKernelTestBase {
   protected function setUp() {
     parent::setUp();
     $this->entityDefinitionUpdateManager = $this->container->get('entity.definition_update_manager');
-    $this->entityFieldManager = $this->container->get('entity_field.manager');
     $this->database = $this->container->get('database');
 
     // Install every entity type's schema that wasn't installed in the parent
@@ -843,74 +833,30 @@ public function testDefinitionEvents() {
     /** @var \Drupal\entity_test\EntityTestDefinitionSubscriber $event_subscriber */
     $event_subscriber = $this->container->get('entity_test.definition.subscriber');
     $event_subscriber->enableEventTracking();
-    $event_subscriber->enableLiveDefinitionUpdates();
 
     // Test field storage definition events.
-    $storage_definition = FieldStorageDefinition::create('string')
-      ->setName('field_storage_test')
-      ->setLabel(new TranslatableMarkup('Field storage test'))
-      ->setTargetEntityTypeId('entity_test_rev');
-
+    $storage_definition = current(\Drupal::service('entity_field.manager')->getFieldStorageDefinitions('entity_test_rev'));
+    $this->assertFalse($event_subscriber->hasEventFired(FieldStorageDefinitionEvents::DELETE), 'Entity type delete was not dispatched yet.');
+    \Drupal::service('field_storage_definition.listener')->onFieldStorageDefinitionDelete($storage_definition);
+    $this->assertTrue($event_subscriber->hasEventFired(FieldStorageDefinitionEvents::DELETE), 'Entity type delete event successfully dispatched.');
     $this->assertFalse($event_subscriber->hasEventFired(FieldStorageDefinitionEvents::CREATE), 'Entity type create was not dispatched yet.');
     \Drupal::service('field_storage_definition.listener')->onFieldStorageDefinitionCreate($storage_definition);
     $this->assertTrue($event_subscriber->hasEventFired(FieldStorageDefinitionEvents::CREATE), 'Entity type create event successfully dispatched.');
-    $this->assertTrue($event_subscriber->hasDefinitionBeenUpdated(FieldStorageDefinitionEvents::CREATE), 'Last installed field storage definition was created before the event was fired.');
-
-    // Check that the newly added field can be retrieved from the live field
-    // storage definitions.
-    $field_storage_definitions = $this->entityFieldManager->getFieldStorageDefinitions('entity_test_rev');
-    $this->assertArrayHasKey('field_storage_test', $field_storage_definitions);
-
-    $updated_storage_definition = clone $storage_definition;
-    $updated_storage_definition->setLabel(new TranslatableMarkup('Updated field storage test'));
     $this->assertFalse($event_subscriber->hasEventFired(FieldStorageDefinitionEvents::UPDATE), 'Entity type update was not dispatched yet.');
-    \Drupal::service('field_storage_definition.listener')->onFieldStorageDefinitionUpdate($updated_storage_definition, $storage_definition);
+    \Drupal::service('field_storage_definition.listener')->onFieldStorageDefinitionUpdate($storage_definition, $storage_definition);
     $this->assertTrue($event_subscriber->hasEventFired(FieldStorageDefinitionEvents::UPDATE), 'Entity type update event successfully dispatched.');
-    $this->assertTrue($event_subscriber->hasDefinitionBeenUpdated(FieldStorageDefinitionEvents::UPDATE), 'Last installed field storage definition was updated before the event was fired.');
-
-    // Check that the updated field can be retrieved from the live field storage
-    // definitions.
-    $field_storage_definitions = $this->entityFieldManager->getFieldStorageDefinitions('entity_test_rev');
-    $this->assertEquals(new TranslatableMarkup('Updated field storage test'), $field_storage_definitions['field_storage_test']->getLabel());
-
-    $this->assertFalse($event_subscriber->hasEventFired(FieldStorageDefinitionEvents::DELETE), 'Entity type delete was not dispatched yet.');
-    \Drupal::service('field_storage_definition.listener')->onFieldStorageDefinitionDelete($storage_definition);
-    $this->assertTrue($event_subscriber->hasEventFired(FieldStorageDefinitionEvents::DELETE), 'Entity type delete event successfully dispatched.');
-    $this->assertTrue($event_subscriber->hasDefinitionBeenUpdated(FieldStorageDefinitionEvents::DELETE), 'Last installed field storage definition was deleted before the event was fired.');
-
-    // Check that the deleted field can no longer be retrieved from the live
-    // field storage definitions.
-    $field_storage_definitions = $this->entityFieldManager->getFieldStorageDefinitions('entity_test_rev');
-    $this->assertArrayNotHasKey('field_storage_test', $field_storage_definitions);
 
     // Test entity type events.
     $entity_type = $this->entityTypeManager->getDefinition('entity_test_rev');
-
     $this->assertFalse($event_subscriber->hasEventFired(EntityTypeEvents::CREATE), 'Entity type create was not dispatched yet.');
     \Drupal::service('entity_type.listener')->onEntityTypeCreate($entity_type);
     $this->assertTrue($event_subscriber->hasEventFired(EntityTypeEvents::CREATE), 'Entity type create event successfully dispatched.');
-    $this->assertTrue($event_subscriber->hasDefinitionBeenUpdated(EntityTypeEvents::CREATE), 'Last installed entity type definition was created before the event was fired.');
-
-    $updated_entity_type = clone $entity_type;
-    $updated_entity_type->set('label', new TranslatableMarkup('Updated entity test rev'));
     $this->assertFalse($event_subscriber->hasEventFired(EntityTypeEvents::UPDATE), 'Entity type update was not dispatched yet.');
-    \Drupal::service('entity_type.listener')->onEntityTypeUpdate($updated_entity_type, $entity_type);
+    \Drupal::service('entity_type.listener')->onEntityTypeUpdate($entity_type, $entity_type);
     $this->assertTrue($event_subscriber->hasEventFired(EntityTypeEvents::UPDATE), 'Entity type update event successfully dispatched.');
-    $this->assertTrue($event_subscriber->hasDefinitionBeenUpdated(EntityTypeEvents::UPDATE), 'Last installed entity type definition was updated before the event was fired.');
-
-    // Check that the updated definition can be retrieved from the live entity
-    // type definitions.
-    $entity_type = $this->entityTypeManager->getDefinition('entity_test_rev');
-    $this->assertEquals(new TranslatableMarkup('Updated entity test rev'), $entity_type->getLabel());
-
     $this->assertFalse($event_subscriber->hasEventFired(EntityTypeEvents::DELETE), 'Entity type delete was not dispatched yet.');
     \Drupal::service('entity_type.listener')->onEntityTypeDelete($entity_type);
     $this->assertTrue($event_subscriber->hasEventFired(EntityTypeEvents::DELETE), 'Entity type delete event successfully dispatched.');
-    $this->assertTrue($event_subscriber->hasDefinitionBeenUpdated(EntityTypeEvents::DELETE), 'Last installed entity type definition was deleted before the event was fired.');
-
-    // Check that the deleted entity type can no longer be retrieved from the
-    // live entity type definitions.
-    $this->assertNull($this->entityTypeManager->getDefinition('entity_test_rev', FALSE));
   }
 
   /**
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityDeriverTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityDeriverTest.php
deleted file mode 100644
index bbe8af0706..0000000000
--- a/core/tests/Drupal/KernelTests/Core/Entity/EntityDeriverTest.php
+++ /dev/null
@@ -1,95 +0,0 @@
-<?php
-
-namespace Drupal\KernelTests\Core\Entity;
-
-use Drupal\comment\Entity\CommentType;
-use Drupal\Component\Plugin\Exception\PluginNotFoundException;
-use Drupal\KernelTests\KernelTestBase;
-use Drupal\node\Entity\NodeType;
-
-/**
- * Tests EntityDeriver functionality.
- *
- * @coversDefaultClass \Drupal\Core\Entity\Plugin\DataType\Deriver\EntityDeriver
- *
- * @group Entity
- */
-class EntityDeriverTest extends KernelTestBase {
-
-  /**
-   * The typed data manager to use.
-   *
-   * @var \Drupal\Core\TypedData\TypedDataManagerInterface
-   */
-  protected $typedDataManager;
-
-  /**
-   * {@inheritdoc}
-   */
-  public static $modules = [
-    'system',
-    'field',
-    'user',
-    'node',
-    'comment',
-    'entity_test',
-  ];
-
-  /**
-   * {@inheritdoc}
-   */
-  protected function setUp() {
-    parent::setup();
-
-    $this->installEntitySchema('comment');
-    NodeType::create(['type' => 'article', 'name' => 'Article'])->save();
-    CommentType::create([
-      'id' => 'comment',
-      'name' => 'Default comment',
-      'target_entity_type_id' => 'node',
-    ])->save();
-    entity_test_create_bundle('foo', NULL, 'entity_test_no_bundle');
-    entity_test_create_bundle('entity_test_no_bundle', NULL, 'entity_test_no_bundle');
-    $this->typedDataManager = $this->container->get('typed_data_manager');
-  }
-
-  /**
-   * Tests that types are derived for entity types with and without bundles.
-   *
-   * @dataProvider derivativesProvider
-   */
-  public function testDerivatives($data_type, $expect_exception) {
-    if ($expect_exception) {
-      $this->expectException(PluginNotFoundException::class);
-    }
-    $this->typedDataManager->createDataDefinition($data_type);
-  }
-
-  /**
-   * Provides test data for ::testDerivatives().
-   */
-  public function derivativesProvider() {
-    return [
-      'unbundleable entity type with no bundle type' => ['entity:user', FALSE],
-      'unbundleable entity type with bundle type' => ['entity:user:user', TRUE],
-      'bundleable entity type with no bundle type' => ['entity:node', FALSE],
-      'bundleable entity type with bundle type' => [
-        'entity:node:article',
-        FALSE,
-      ],
-      'bundleable entity type with bundle type with matching name' => [
-        'entity:comment:comment',
-        FALSE,
-      ],
-      'unbundleable entity type with entity_test_entity_bundle_info()-generated bundle type' => [
-        'entity:entity_test_no_bundle:foo',
-        FALSE,
-      ],
-      'unbundleable entity type with entity_test_entity_bundle_info()-generated bundle type with matching name' => [
-        'entity:entity_test_no_bundle:entity_test_no_bundle',
-        FALSE,
-      ],
-    ];
-  }
-
-}
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityTypedDataDefinitionTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityTypedDataDefinitionTest.php
index dcfe664a6d..b4d97bf910 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/EntityTypedDataDefinitionTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityTypedDataDefinitionTest.php
@@ -151,7 +151,6 @@ public function testEntityDefinitionIsInternal($internal, $expected) {
 
     $entity_type = $this->prophesize(EntityTypeInterface::class);
     $entity_type->entityClassImplements(ConfigEntityInterface::class)->willReturn(FALSE);
-    $entity_type->getKey('bundle')->willReturn(FALSE);
     $entity_type->getLabel()->willReturn($this->randomString());
     $entity_type->getConstraints()->willReturn([]);
     $entity_type->isInternal()->willReturn($internal);
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/FieldableEntityDefinitionUpdateTest.php b/core/tests/Drupal/KernelTests/Core/Entity/FieldableEntityDefinitionUpdateTest.php
index a525f650eb..937a2ab5a4 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/FieldableEntityDefinitionUpdateTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/FieldableEntityDefinitionUpdateTest.php
@@ -151,17 +151,13 @@ public function testFieldableEntityTypeUpdates($initial_rev, $initial_mul, $new_
       $this->assertEntityData($initial_rev, $initial_mul);
     }
 
-    // Enable the creation of a new base field during a fieldable entity type
-    // update.
-    $this->state->set('entity_test_update.install_new_base_field_during_update', TRUE);
-
     // Simulate a batch run since we are converting the entities one by one.
     $sandbox = [];
     do {
       $this->entityDefinitionUpdateManager->updateFieldableEntityType($updated_entity_type, $updated_field_storage_definitions, $sandbox);
     } while ($sandbox['#finished'] != 1);
 
-    $this->assertEntityTypeSchema($new_rev, $new_mul, TRUE);
+    $this->assertEntityTypeSchema($new_rev, $new_mul);
     $this->assertEntityData($initial_rev, $initial_mul);
 
     $change_list = $this->entityDefinitionUpdateManager->getChangeList();
@@ -431,20 +427,8 @@ protected function assertEntityData($revisionable, $translatable) {
    *   Whether the entity type is revisionable or not.
    * @param bool $translatable
    *   Whether the entity type is translatable or not.
-   * @param bool $new_base_field
-   *   (optional) Whether a new base field was added as part of the update.
-   *   Defaults to FALSE.
    */
-  protected function assertEntityTypeSchema($revisionable, $translatable, $new_base_field = FALSE) {
-    // Check whether the 'new_base_field' field has been installed correctly.
-    $field_storage_definition = $this->entityDefinitionUpdateManager->getFieldStorageDefinition('new_base_field', $this->entityTypeId);
-    if ($new_base_field) {
-      $this->assertNotNull($field_storage_definition);
-    }
-    else {
-      $this->assertNull($field_storage_definition);
-    }
-
+  protected function assertEntityTypeSchema($revisionable, $translatable) {
     if ($revisionable && $translatable) {
       $this->assertRevisionableAndTranslatable();
     }
