public function controller($controller, $attributes = [], $query = [])
    {
        if (!isset($attributes['pathInfo'])) {
            $site = $this->siteSelector->retrieve();
            if ($site) {
                $sitePath = $site->getRelativePath();
                $globals = $this->environment->getGlobals();
                $currentPathInfo = $globals['app']->getRequest()->getPathInfo();

                $attributes['pathInfo'] = $sitePath.$currentPathInfo;
            }
        }

        // Simplify this when dropping twig-bridge < 3.2 support
        if (method_exists(AppVariable::class, 'getToken')) {
            return HttpKernelExtension::controller($controller, $attributes, $query);
        }

        return $this->httpKernelExtension->controller($controller, $attributes, $query);
    }