core-bundle/src/EventListener/StoreRefererListener.php
private function getRelativeRequestUri(Request $request): string
    {
        return (string) substr($request->getRequestUri(), \strlen($request->getBasePath()) + 1);
    }
private function getRelativeRequestUri(Request $request): string
    {
        return (string) substr($request->getRequestUri(), \strlen($request->getBasePath()) + 1);
    }
Returns the current request URI relative to the base path.