diff --git a/src/JsonRequestTransformerListener.php b/src/JsonRequestTransformerListener.php index ee2b83e..9ed6d4f 100755 --- a/src/JsonRequestTransformerListener.php +++ b/src/JsonRequestTransformerListener.php @@ -37,7 +37,7 @@ public function onKernelRequest(RequestEvent $event): void } if (!$this->transformJsonBody($request)) { - $response = Response::create('Unable to parse request.', Response::HTTP_BAD_REQUEST); + $response = new Response('Unable to parse request.', Response::HTTP_BAD_REQUEST); $event->setResponse($response); } }