diff --git a/EventListener/BodyListener.php b/EventListener/BodyListener.php index cdf0e80b9..bacffde78 100644 --- a/EventListener/BodyListener.php +++ b/EventListener/BodyListener.php @@ -90,6 +90,7 @@ public function onKernelRequest(RequestEvent $event): void if (is_array($data)) { $request->request = new ParameterBag($data); $normalizeRequest = true; + $request->attributes->set('_fosrestbundle_decoder', get_class($decoder)); } else { throw new BadRequestHttpException('Invalid '.$format.' message received'); }