Index: src/SerializerDecorator.php
===================================================================
--- src/SerializerDecorator.php	(date 1545520299000)
+++ src/SerializerDecorator.php	(date 1545520299000)
@@ -1,140 +0,0 @@
-<?php
-
-namespace Drupal\jsonapi_extras;
-
-use Symfony\Component\Serializer\SerializerInterface;
-use Symfony\Component\Serializer\Encoder\DecoderInterface;
-use Symfony\Component\Serializer\Encoder\EncoderInterface;
-use Symfony\Component\Serializer\Normalizer\NormalizerInterface;
-use Symfony\Component\Serializer\Normalizer\DenormalizerInterface;
-use Drupal\jsonapi\Serializer\Serializer;
-
-/**
- * A decorated JSON API serializer, with lazily initialized fallback serializer.
- */
-class SerializerDecorator implements SerializerInterface, NormalizerInterface, DenormalizerInterface, EncoderInterface, DecoderInterface {
-
-  /**
-   * The decorated JSON API serializer service.
-   *
-   * @var \Drupal\jsonapi\Serializer\Serializer
-   */
-  protected $decoratedSerializer;
-
-  /**
-   * Whether the lazy dependency has been initialized.
-   *
-   * @var bool
-   */
-  protected $isInitialized = FALSE;
-
-  /**
-   * Constructs a SerializerDecorator.
-   *
-   * @param \Drupal\jsonapi\Serializer\Serializer $serializer
-   *   The decorated JSON API serializer.
-   */
-  public function __construct(Serializer $serializer) {
-    $this->decoratedSerializer = $serializer;
-  }
-
-  /**
-   * Lazily initializes the fallback serializer for the JSON API serializer.
-   *
-   * Breaks circular dependency.
-   */
-  protected function lazilyInitialize() {
-    if (!$this->isInitialized) {
-      $core_serializer = \Drupal::service('serializer');
-      $this->decoratedSerializer->setFallbackNormalizer($core_serializer);
-      $this->isInitialized = TRUE;
-    }
-  }
-
-  /**
-   * Relays a method call to the decorated service.
-   *
-   * @param string $method_name
-   *   The method to invoke on the decorated serializer.
-   * @param array $args
-   *   The arguments to pass to the invoked method on the decorated serializer.
-   *
-   * @return mixed
-   *   The return value.
-   */
-  protected function relay($method_name, array $args) {
-    $this->lazilyInitialize();
-    return call_user_func_array([$this->decoratedSerializer, $method_name], $args);
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function decode($data, $format, array $context = []) {
-    return $this->relay(__FUNCTION__, func_get_args());
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function denormalize($data, $class, $format = NULL, array $context = []) {
-    return $this->relay(__FUNCTION__, func_get_args());
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function deserialize($data, $type, $format, array $context = []) {
-    return $this->relay(__FUNCTION__, func_get_args());
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function encode($data, $format, array $context = []) {
-    return $this->relay(__FUNCTION__, func_get_args());
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function normalize($object, $format = NULL, array $context = []) {
-    return $this->relay(__FUNCTION__, func_get_args());
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function supportsDecoding($format) {
-    return $this->relay(__FUNCTION__, func_get_args());
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function serialize($data, $format, array $context = []) {
-    return $this->relay(__FUNCTION__, func_get_args());
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function supportsDenormalization($data, $type, $format = NULL) {
-    return $this->relay(__FUNCTION__, func_get_args());
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function supportsEncoding($format) {
-    return $this->relay(__FUNCTION__, func_get_args());
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function supportsNormalization($data, $format = NULL) {
-    return $this->relay(__FUNCTION__, func_get_args());
-  }
-
-}
Index: src/Normalizer/EntityNormalizerTrait.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- src/Normalizer/EntityNormalizerTrait.php	(date 1545520299000)
+++ src/Normalizer/EntityNormalizerTrait.php	(date 1545805676000)
@@ -16,19 +16,11 @@
    *   The input data to modify.
    * @param \Drupal\jsonapi\ResourceType\ResourceType $resource_type
    *   Contains the info about the resource type.
-   * @param string $format
-   *   (optional) Format from which the given data was extracted. Only required
-   *   for JSON API 2.x.
-   * @param array $context
-   *   (optional) Options available to the denormalizer. Only required for JSON
-   *   API 2.x.
    *
    * @return array
    *   The modified input data.
-   *
-   * @todo Make the last 2 args non-optional when JSON API 2.x is required.
    */
-  protected function prepareInput(array $data, ResourceType $resource_type, $format = NULL, array $context = []) {
+  protected function prepareInput(array $data, ResourceType $resource_type) {
     /** @var \Drupal\Core\Field\FieldStorageDefinitionInterface[] $field_storage_definitions */
     $field_storage_definitions = \Drupal::service('entity_field.manager')
       ->getFieldStorageDefinitions(
@@ -70,7 +62,7 @@
       $data_internal[$internal_name] = $field_value;
     }
 
-    return parent::prepareInput($data_internal, $resource_type, $format, $context);
+    return parent::prepareInput($data_internal, $resource_type);
   }
 
   /**
Index: src/JsonapiExtrasServiceProvider.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- src/JsonapiExtrasServiceProvider.php	(date 1545520299000)
+++ src/JsonapiExtrasServiceProvider.php	(date 1545806669000)
@@ -28,24 +28,6 @@
       $definition->addMethodCall('setConfigFactory', [new Reference('config.factory')]);
     }
 
-    // Make all three of the normalizers that JSON API Extras overrides private
-    // untagged services, to ensure that JSON API Extras' overrides continue to
-    // work in JSON API 2.x, using core's @serializer service.
-    if ($container->has('serializer.normalizer.field_item.jsonapi')) {
-      $container->getDefinition('serializer.normalizer.field_item.jsonapi')->setPrivate(TRUE)->clearTags();
-    }
-    if ($container->has('serializer.normalizer.entity.jsonapi')) {
-      $container->getDefinition('serializer.normalizer.entity.jsonapi')->setPrivate(TRUE)->clearTags();
-    }
-    if ($container->has('serializer.normalizer.config_entity.jsonapi')) {
-      $container->getDefinition('serializer.normalizer.config_entity.jsonapi')->setPrivate(TRUE)->clearTags();
-    }
-
-    // Break a circular dependency.
-    // @see \Drupal\jsonapi_extras\SerializerDecorator::lazilyInitialize()
-    $definition = $container->getDefinition('jsonapi.serializer_do_not_use_removal_imminent');
-    $definition->removeMethodCall('setFallbackNormalizer');
-
     $settings = BootstrapConfigStorageFactory::get()
       ->read('jsonapi_extras.settings');
 
Index: src/EntityToJsonApi.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- src/EntityToJsonApi.php	(date 1545520299000)
+++ src/EntityToJsonApi.php	(date 1545806724000)
@@ -5,10 +5,10 @@
 use Drupal\Core\Entity\EntityInterface;
 use Drupal\Core\Session\AccountInterface;
 use Drupal\jsonapi\JsonApiResource\EntityCollection;
+use Drupal\jsonapi\Resource\JsonApiDocumentTopLevel;
 use Drupal\jsonapi\ResourceType\ResourceTypeRepositoryInterface;
 use Drupal\jsonapi\Routing\Routes;
 use Drupal\jsonapi\Serializer\Serializer;
-use Drupal\jsonapi_extras\ResourceType\ConfigurableResourceTypeRepository;
 use Symfony\Component\HttpFoundation\Request;
 use Symfony\Component\HttpFoundation\RequestStack;
 use Symfony\Component\Serializer\SerializerInterface;
@@ -58,7 +58,7 @@
   /**
    * EntityToJsonApi constructor.
    *
-   * @param \Drupal\jsonapi\Serializer\Serializer|\Drupal\jsonapi_extras\SerializerDecorator $serializer
+   * @param \Symfony\Component\Serializer\SerializerInterface $serializer
    *   The serializer.
    * @param \Drupal\jsonapi\ResourceType\ResourceTypeRepositoryInterface $resource_type_repository
    *   The resource type repository.
@@ -70,7 +70,7 @@
    *   The JSON API base path.
    */
   public function __construct(SerializerInterface $serializer, ResourceTypeRepositoryInterface $resource_type_repository, AccountInterface $current_user, RequestStack $request_stack, $jsonapi_base_path) {
-    assert($serializer instanceof Serializer || $serializer instanceof SerializerDecorator);
+    assert($serializer instanceof Serializer);
     $this->serializer = $serializer;
     $this->resourceTypeRepository = $resource_type_repository;
     $this->currentUser = $current_user;
@@ -80,9 +80,6 @@
     assert(isset($jsonapi_base_path[1]));
     assert(substr($jsonapi_base_path, -1) !== '/');
     $this->jsonApiBasePath = $jsonapi_base_path;
-    $this->classToUse = ConfigurableResourceTypeRepository::isJsonApi2x()
-      ? '\Drupal\jsonapi\JsonApiResource\JsonApiDocumentTopLevel'
-      : '\Drupal\jsonapi\Resource\JsonApiDocumentTopLevel';
   }
 
   /**
@@ -101,9 +98,7 @@
     foreach ($includes as $field_name) {
       $referenced_entities = array_merge($referenced_entities, $entity->get($field_name)->referencedEntities());
     }
-    $document = ConfigurableResourceTypeRepository::isJsonApi2x()
-      ? new $this->classToUse($entity, new EntityCollection($referenced_entities), [])
-      : new $this->classToUse($entity);
+    $document = new JsonApiDocumentTopLevel($entity);
     return $this->serializer->serialize($document,
       'api_json',
       $this->calculateContext($entity, $includes)
@@ -126,9 +121,7 @@
     foreach ($includes as $field_name) {
       $referenced_entities = array_merge($referenced_entities, $entity->get($field_name)->referencedEntities());
     }
-    $document = ConfigurableResourceTypeRepository::isJsonApi2x()
-      ? new $this->classToUse($entity, new EntityCollection($referenced_entities), [])
-      : new $this->classToUse($entity);
+    $document = new JsonApiDocumentTopLevel($entity);
     return $this->serializer->normalize($document,
       'api_json',
       $this->calculateContext($entity, $includes)
Index: tests/src/Kernel/EntityToJsonApiTest.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- tests/src/Kernel/EntityToJsonApiTest.php	(date 1545520299000)
+++ tests/src/Kernel/EntityToJsonApiTest.php	(date 1545805676000)
@@ -172,9 +172,6 @@
    * @covers ::normalize
    */
   public function testSerialize() {
-    $tid_public_name = ConfigurableResourceTypeRepository::isJsonApi2x()
-      ? 'drupal_internal__tid'
-      : 'tid';
     $entities = [
       [
         $this->node,
@@ -184,7 +181,7 @@
             'type' => 'taxonomy_term--tags',
             'id' => $this->term1->uuid(),
             'attributes' => [
-              $tid_public_name => (int) $this->term1->id(),
+              'tid' => (int) $this->term1->id(),
               'name' => $this->term1->label(),
             ],
           ],
@@ -192,7 +189,7 @@
             'type' => 'taxonomy_term--tags',
             'id' => $this->term2->uuid(),
             'attributes' => [
-              $tid_public_name => (int) $this->term2->id(),
+              'tid' => (int) $this->term2->id(),
               'name' => $this->term2->label(),
             ],
           ],
@@ -257,9 +254,7 @@
     static::assertNotEmpty($structured['data']['type']);
     static::assertNotEmpty($structured['data']['id']);
     static::assertNotEmpty($structured['data']['attributes']);
-    if (!ConfigurableResourceTypeRepository::isJsonApi2x()) {
-      static::assertInternalType('string', $structured['links']['self']);
-    }
+    static::assertInternalType('string', $structured['links']['self']);
   }
 
   /**
Index: tests/src/Functional/JsonExtrasApiFunctionalTest.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- tests/src/Functional/JsonExtrasApiFunctionalTest.php	(date 1545520299000)
+++ tests/src/Functional/JsonExtrasApiFunctionalTest.php	(date 1545805954000)
@@ -182,14 +182,8 @@
     // 13. Test a disabled related resource of single cardinality.
     $this->drupalGet('/api/taxonomy_term/tags/' . $this->tags[0]->uuid() . '/vid');
     $this->assertSession()->statusCodeEquals(404);
-    $output = Json::decode($this->drupalGet('/api/taxonomy_term/tags/' . $this->tags[0]->uuid() . '/relationships/vid'));
-    if (ConfigurableResourceTypeRepository::isJsonApi2x()) {
-      $this->assertSession()->statusCodeEquals(200);
-      $this->assertSame(NULL, $output['data']);
-    }
-    else {
-      $this->assertSession()->statusCodeEquals(404);
-    }
+    Json::decode($this->drupalGet('/api/taxonomy_term/tags/' . $this->tags[0]->uuid() . '/relationships/vid'));
+    $this->assertSession()->statusCodeEquals(404);
 
     // 14. Test a disabled related resource of multiple cardinality.
     $this->tags[1]->vocabs->set(0, 'tags');
@@ -275,12 +269,7 @@
     $this->assertEquals(201, $response->getStatusCode());
     $this->assertArrayHasKey('internalId', $created_response['data']['attributes']);
     $this->assertCount(2, $created_response['data']['relationships']['tags']['data']);
-    if (ConfigurableResourceTypeRepository::isJsonApi2x()) {
-      $this->assertSame($created_response['data']['links']['self']['href'], $response->getHeader('Location')[0]);
-    }
-    else {
-      $this->assertSame($created_response['data']['links']['self'], $response->getHeader('Location')[0]);
-    }
+    $this->assertSame($created_response['data']['links']['self'], $response->getHeader('Location')[0]);
     $date = new \DateTime($body['data']['attributes']['timestamp']);
     $created_node = Node::load($created_response['data']['attributes']['internalId']);
     $this->assertSame((int) $date->format('U'), (int) $created_node->get('field_timestamp')->value);
Index: jsonapi_extras.services.yml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- jsonapi_extras.services.yml	(date 1545520299000)
+++ jsonapi_extras.services.yml	(date 1545806724000)
@@ -6,20 +6,18 @@
       - '@entity_type.manager'
       - '@plugin.manager.resource_field_enhancer'
     tags:
-      - { name: normalizer, priority: 1025, format: api_json }
+      - { name: jsonapi_normalizer_do_not_use_removal_imminent, priority: 25, format: api_json }
 
   serializer.normalizer.entity.jsonapi_extras:
     class: Drupal\jsonapi_extras\Normalizer\ContentEntityNormalizer
     parent: serializer.normalizer.entity.jsonapi
-    calls:
-      - [setSerializer, ['@jsonapi.serializer_do_not_use_removal_imminent']]
     tags:
-      - { name: normalizer, priority: 1022, format: api_json }
+      - { name: jsonapi_normalizer_do_not_use_removal_imminent, priority: 22, format: api_json }
   serializer.normalizer.config_entity.jsonapi_extras:
     class: Drupal\jsonapi_extras\Normalizer\ConfigEntityNormalizer
     parent: serializer.normalizer.config_entity.jsonapi
     tags:
-      - { name: normalizer, priority: 1022, format: api_json }
+      - { name: jsonapi_normalizer_do_not_use_removal_imminent, priority: 22, format: api_json }
 
   plugin.manager.resource_field_enhancer:
     class: Drupal\jsonapi_extras\Plugin\ResourceFieldEnhancerManager
@@ -35,9 +33,3 @@
   jsonapi_extras.entity.to_jsonapi:
     class: Drupal\jsonapi_extras\EntityToJsonApi
     arguments: ['@jsonapi.serializer_do_not_use_removal_imminent', '@jsonapi.resource_type.repository', '@current_user', '@request_stack', '%jsonapi.base_path%']
-
-  jsonapi.serializer_do_not_use_removal_imminent.jsonapi_extras:
-    class: \Drupal\jsonapi_extras\SerializerDecorator
-    public: false
-    decorates: jsonapi.serializer_do_not_use_removal_imminent
-    arguments: ['@jsonapi.serializer_do_not_use_removal_imminent.jsonapi_extras.inner']
Index: tests/src/Kernel/Controller/EntityResourceTest.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- tests/src/Kernel/Controller/EntityResourceTest.php	(date 1545520299000)
+++ tests/src/Kernel/Controller/EntityResourceTest.php	(date 1545805683000)
@@ -21,10 +21,6 @@
  * @group jsonapi_extras
  * @group legacy
  *
- * When upgrading JSON API Extras to work with JSON API 2.x revert to this patch
- * instead.
- * @see https://www.drupal.org/project/jsonapi_extras/issues/2995804#comment-12752336
- *
  * @internal
  */
 class EntityResourceTest extends KernelTestBase {
@@ -67,39 +63,19 @@
       ->grantPermission('administer content types')
       ->save();
     $resource_type = new ResourceType('node', 'article', NULL);
-    if (ConfigurableResourceTypeRepository::isJsonApi2x()) {
-      $entity_resource = new EntityResource(
-        $this->container->get('entity_type.manager'),
-        $this->container->get('entity_field.manager'),
-        $this->container->get('jsonapi.link_manager'),
-        $this->container->get('jsonapi.resource_type.repository'),
-        $this->container->get('renderer'),
-        $this->container->get('entity.repository'),
-        $this->container->get('jsonapi.include_resolver'),
-        $this->container->get('renderer')
-      );
-      $response = $entity_resource->createIndividual($resource_type, $node_type, new Request());
-    }
-    else {
-      $entity_resource = new EntityResource(
-        $resource_type,
-        $this->container->get('entity_type.manager'),
-        $this->container->get('entity_field.manager'),
-        $this->container->get('plugin.manager.field.field_type'),
-        $this->container->get('jsonapi.link_manager'),
-        $this->container->get('jsonapi.resource_type.repository'),
-        $this->container->get('renderer')
-      );
-      $response = $entity_resource->createIndividual($node_type, new Request());
-    }
+    $entity_resource = new EntityResource(
+      $resource_type,
+      $this->container->get('entity_type.manager'),
+      $this->container->get('entity_field.manager'),
+      $this->container->get('plugin.manager.field.field_type'),
+      $this->container->get('jsonapi.link_manager'),
+      $this->container->get('jsonapi.resource_type.repository'),
+      $this->container->get('renderer')
+    );
+    $response = $entity_resource->createIndividual($node_type, new Request());
     // As a side effect, the node type will also be saved.
     $this->assertNotEmpty($node_type->id());
-    if (ConfigurableResourceTypeRepository::isJsonApi2x()) {
-      $this->assertInstanceOf(JsonApiDocumentTopLevel2::class, $response->getResponseData());
-    }
-    else {
-      $this->assertInstanceOf(JsonApiDocumentTopLevel::class, $response->getResponseData());
-    }
+    $this->assertInstanceOf(JsonApiDocumentTopLevel::class, $response->getResponseData());
     $this->assertEquals('test', $response->getResponseData()->getData()->id());
     $this->assertEquals(201, $response->getStatusCode());
   }
@@ -135,39 +111,19 @@
     $request = new Request([], [], [], [], [], [], $payload);
 
     $resource_type = new ResourceType('node', 'article', NULL);
-    if (ConfigurableResourceTypeRepository::isJsonApi2x()) {
-      $entity_resource = new EntityResource(
-        $this->container->get('entity_type.manager'),
-        $this->container->get('entity_field.manager'),
-        $this->container->get('jsonapi.link_manager'),
-        $this->container->get('jsonapi.resource_type.repository'),
-        $this->container->get('renderer'),
-        $this->container->get('entity.repository'),
-        $this->container->get('jsonapi.include_resolver'),
-        $this->container->get('renderer')
-      );
-      $response = $entity_resource->patchIndividual($resource_type, $node_type, $parsed_node_type, $request);
-    }
-    else {
-      $entity_resource = new EntityResource(
-        $resource_type,
-        $this->container->get('entity_type.manager'),
-        $this->container->get('entity_field.manager'),
-        $this->container->get('plugin.manager.field.field_type'),
-        $this->container->get('jsonapi.link_manager'),
-        $this->container->get('jsonapi.resource_type.repository'),
-        $this->container->get('renderer')
-      );
-      $response = $entity_resource->patchIndividual($node_type, $parsed_node_type, $request);
-    }
+    $entity_resource = new EntityResource(
+      $resource_type,
+      $this->container->get('entity_type.manager'),
+      $this->container->get('entity_field.manager'),
+      $this->container->get('plugin.manager.field.field_type'),
+      $this->container->get('jsonapi.link_manager'),
+      $this->container->get('jsonapi.resource_type.repository'),
+      $this->container->get('renderer')
+    );
+    $response = $entity_resource->patchIndividual($node_type, $parsed_node_type, $request);
 
     // As a side effect, the node will also be saved.
-    if (ConfigurableResourceTypeRepository::isJsonApi2x()) {
-      $this->assertInstanceOf(JsonApiDocumentTopLevel2::class, $response->getResponseData());
-    }
-    else {
-      $this->assertInstanceOf(JsonApiDocumentTopLevel::class, $response->getResponseData());
-    }
+    $this->assertInstanceOf(JsonApiDocumentTopLevel::class, $response->getResponseData());
     $updated_node_type = $response->getResponseData()->getData();
     $this->assertInstanceOf(NodeType::class, $updated_node_type);
     // If the field is ignored then we should not see a difference.
@@ -229,30 +185,15 @@
       ->grantPermission('administer content types')
       ->save();
     $resource_type = new ResourceType('node', 'article', NULL);
-    if (ConfigurableResourceTypeRepository::isJsonApi2x()) {
-      $entity_resource = new EntityResource(
-        $this->container->get('entity_type.manager'),
-        $this->container->get('entity_field.manager'),
-        $this->container->get('jsonapi.link_manager'),
-        $this->container->get('jsonapi.resource_type.repository'),
-        $this->container->get('renderer'),
-        $this->container->get('entity.repository'),
-        $this->container->get('jsonapi.include_resolver'),
-        $this->container->get('renderer')
-      );
-
-    }
-    else {
-      $entity_resource = new EntityResource(
-        $resource_type,
-        $this->container->get('entity_type.manager'),
-        $this->container->get('entity_field.manager'),
-        $this->container->get('plugin.manager.field.field_type'),
-        $this->container->get('jsonapi.link_manager'),
-        $this->container->get('jsonapi.resource_type.repository'),
-        $this->container->get('renderer')
-      );
-    }
+    $entity_resource = new EntityResource(
+      $resource_type,
+      $this->container->get('entity_type.manager'),
+      $this->container->get('entity_field.manager'),
+      $this->container->get('plugin.manager.field.field_type'),
+      $this->container->get('jsonapi.link_manager'),
+      $this->container->get('jsonapi.resource_type.repository'),
+      $this->container->get('renderer')
+    );
     $response = $entity_resource->deleteIndividual($node_type, new Request());
     // As a side effect, the node will also be deleted.
     $count = $this->container->get('entity_type.manager')
Index: src/Entity/JsonapiResourceConfig.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- src/Entity/JsonapiResourceConfig.php	(date 1545520299000)
+++ src/Entity/JsonapiResourceConfig.php	(date 1545805755000)
@@ -102,31 +102,4 @@
     }
   }
 
-  /**
-   * Returns a field mapping as expected by JSON API 2.x' ResourceType class.
-   *
-   * @see \Drupal\jsonapi\ResourceType\ResourceType::__construct()
-   */
-  public function getFieldMapping() {
-    $resource_fields = $this->get('resourceFields') ?: [];
-
-    $mapping = [];
-    foreach ($resource_fields as $resource_field) {
-      $field_name = $resource_field['fieldName'];
-      if ($resource_field['disabled'] === TRUE) {
-        $mapping[$field_name] = FALSE;
-        continue;
-      }
-
-      if (($alias = $resource_field['publicName']) && $alias !== $field_name) {
-        $mapping[$field_name] = $alias;
-        continue;
-      }
-
-      $mapping[$field_name] = TRUE;
-    }
-
-    return $mapping;
-  }
-
 }
Index: src/ResourceType/ConfigurableResourceTypeRepository.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- src/ResourceType/ConfigurableResourceTypeRepository.php	(date 1545520299000)
+++ src/ResourceType/ConfigurableResourceTypeRepository.php	(date 1545806111000)
@@ -64,34 +64,6 @@
    */
   protected $resourceConfigs;
 
-  /**
-   * Detects whether this site has JSON API 1.x or 2.x installed.
-   *
-   * @return bool
-   *   TRUE if JSON API 2.x is installed. FALSE otherwise.
-   *
-   * @todo Remove this when JSON API Extras drops support for JSON API 1.x.
-   */
-  public static function isJsonApi2x() {
-    static $is_2x = NULL;
-
-    if ($is_2x !== NULL) {
-      return $is_2x;
-    }
-    $extension = \Drupal::service('extension.list.module')->get('jsonapi');
-    $version = $extension->info['version'];
-    if ($version === NULL) {
-      // When running a git clone of the module we will not get a version number
-      // here. In this case we resort to checking for a 2.x only service.
-      $is_2x = \Drupal::hasService('jsonapi.include_resolver');
-    }
-    else {
-      $dependency = ModuleHandler::parseDependency('jsonapi(>= 8.x-2.0-beta1)');
-      $is_2x = drupal_check_incompatibility($dependency, $version) === NULL;
-    }
-    return $is_2x;
-  }
-
   /**
    * Injects the entity repository.
    *
@@ -124,14 +96,8 @@
 
   /**
    * {@inheritdoc}
-   *
-   * @todo Remove this when JSON API Extras drops support for JSON API 1.x.
    */
   public function all() {
-    if (static::isJsonApi2x()) {
-      return parent::all();
-    }
-
     if (empty($this->all)) {
       $all = parent::all();
       array_walk($all, [$this, 'injectAdditionalServicesToResourceType']);
