From cd01cc26acb6ef939912a4b4c4ff1f0055563386 Mon Sep 17 00:00:00 2001 From: soyuka Date: Wed, 11 Sep 2024 09:27:26 +0200 Subject: [PATCH] fix(state): remove resource_class change --- src/State/Processor/SerializeProcessor.php | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/State/Processor/SerializeProcessor.php b/src/State/Processor/SerializeProcessor.php index 088eb3e7dec..b56bd332a4d 100644 --- a/src/State/Processor/SerializeProcessor.php +++ b/src/State/Processor/SerializeProcessor.php @@ -52,11 +52,6 @@ public function process(mixed $data, Operation $operation, array $uriVariables = $context['original_data'] = $data; $class = $operation->getClass(); - if ($request->attributes->get('_api_resource_class') && $request->attributes->get('_api_resource_class') !== $operation->getClass()) { - $class = $request->attributes->get('_api_resource_class'); - trigger_deprecation('api-platform/core', '3.3', 'The resource class on the router is not the same as the operation\'s class which leads to wrong behaviors. Prefer using "stateOptions" if you need to change the entity class.'); - } - $serializerContext = $this->serializerContextBuilder->createFromRequest($request, true, [ 'resource_class' => $class, 'operation' => $operation,