code: private function getRelativeRequestUri(Request $request): string
      {
          return (string) substr($request->getRequestUri(), \strlen($request->getBasePath()) + 1);
      }
docs: Returns the current request URI relative to the base path.