private function recomposeSymfonyRequest(Request $request)
    {
        try{
            try {
                $content = $request->getContent(true);
            } catch (\LogicException $e) {
                $content = $request->getContent();
            }
        }catch(\LogicException $e){
            $content = file_get_contents('php://input');
        }
        return $request::create(
            $request->getUri(),
            $request->getMethod(),
            $request->getMethod() === 'PATCH' ? $request->request->all() : $request->query->all(),
            $request->cookies->all(),
            $request->files->all(),
            $request->server->all(),
            $content
        );
    }
private function recomposeSymfonyRequest(Request $request)
    {
        try{
            try {
                $content = $request->getContent(true);
            } catch (\LogicException $e) {
                $content = $request->getContent();
            }
        }catch(\LogicException $e){
            $content = file_get_contents('php://input');
        }
        return $request::create(
            $request->getUri(),
            $request->getMethod(),
            $request->getMethod() === 'PATCH' ? $request->request->all() : $request->query->all(),
            $request->cookies->all(),
            $request->files->all(),
            $request->server->all(),
            $content
        );
    }
private function recomposeSymfonyRequest ( Request $ request ) { try { try { $ content = $ request -> getContent ( true ) ; } catch ( \ LogicException $ e ) { $ content = $ request -> getContent ( ) ; } } catch ( \ LogicException $ e ) { $ content = file_get_contents ( 'php://input' ) ; } return $ request :: create ( $ request -> getUri ( ) , $ request -> getMethod ( ) , $ request -> getMethod ( ) === 'PATCH' ? $ request -> request -> all ( ) : $ request -> query -> all ( ) , $ request -> cookies -> all ( ) , $ request -> files -> all ( ) , $ request -> server -> all ( ) , $ content ) ; }
Avoid exception throw when request content is null

@param Request $request
@return Request
Avoid exception throw when request content is null