From 06e7f027d8d85453259e1c768b9b9eb1ca620998 Mon Sep 17 00:00:00 2001
From: catch <catch@35733.no-reply.drupal.org>
Date: Fri, 17 Sep 2021 14:22:52 +0100
Subject: [PATCH] Issue #3231040 by Anul, longwave, alexpott, bbrala: Remove
 DependencySerializationTrait from JSON API exceptions

---
 .../jsonapi/src/Exception/EntityAccessDeniedHttpException.php  | 2 --
 .../jsonapi/src/Exception/UnprocessableHttpEntityException.php | 3 ---
 2 files changed, 5 deletions(-)

diff --git a/core/modules/jsonapi/src/Exception/EntityAccessDeniedHttpException.php b/core/modules/jsonapi/src/Exception/EntityAccessDeniedHttpException.php
index 74ab245e5114..c227709900c1 100644
--- a/core/modules/jsonapi/src/Exception/EntityAccessDeniedHttpException.php
+++ b/core/modules/jsonapi/src/Exception/EntityAccessDeniedHttpException.php
@@ -5,7 +5,6 @@
 use Drupal\Core\Access\AccessResultInterface;
 use Drupal\Core\Access\AccessResultReasonInterface;
 use Drupal\Core\Cache\CacheableMetadata;
-use Drupal\Core\DependencyInjection\DependencySerializationTrait;
 use Drupal\Core\Entity\EntityInterface;
 use Drupal\Core\Http\Exception\CacheableAccessDeniedHttpException;
 use Drupal\jsonapi\JsonApiResource\ResourceIdentifier;
@@ -23,7 +22,6 @@
  */
 class EntityAccessDeniedHttpException extends CacheableAccessDeniedHttpException implements ResourceIdentifierInterface {
 
-  use DependencySerializationTrait;
   use ResourceIdentifierTrait;
 
   /**
diff --git a/core/modules/jsonapi/src/Exception/UnprocessableHttpEntityException.php b/core/modules/jsonapi/src/Exception/UnprocessableHttpEntityException.php
index b9d5a6f58389..eae202c553f1 100644
--- a/core/modules/jsonapi/src/Exception/UnprocessableHttpEntityException.php
+++ b/core/modules/jsonapi/src/Exception/UnprocessableHttpEntityException.php
@@ -3,7 +3,6 @@
 namespace Drupal\jsonapi\Exception;
 
 use Drupal\Core\Entity\EntityConstraintViolationListInterface;
-use Drupal\Core\DependencyInjection\DependencySerializationTrait;
 use Symfony\Component\HttpKernel\Exception\HttpException;
 
 /**
@@ -23,8 +22,6 @@
  */
 class UnprocessableHttpEntityException extends HttpException {
 
-  use DependencySerializationTrait;
-
   /**
    * The constraint violations associated with this exception.
    *
-- 
GitLab