code: private function getRedirectResponse(): RedirectResponse
      {
          $request = $this->container->get('request_stack')->getCurrentRequest();
  
          if (null === $request) {
              throw new \RuntimeException('The request stack did not contain a request');
          }
  
          return new RedirectResponse($request->getRequestUri());
      }
docs: Returns a redirect response to reload the page.
  
  @throws \RuntimeException