Processes a MethodNotAllowed exception into an HTTP 405 response.
Symfony\Component\HttpKernel\Exception\FlattenException $exception: The flattened exception.
Symfony\Component\HttpFoundation\Request $request: The request object that triggered this exception.
public function on405Html(FlattenException $exception, Request $request) {
return new Response('Method Not Allowed', 405);
}