protected function symlinkLegacyExtensionOverride(string $legacyExtensionPath, OutputInterface $output): void
    {
        $legacyRootDir = $this->getContainer()->getParameter('ezpublish_legacy.root_dir');

        // If settings/override folder exists in "root_*", obviously we cannot use the one in "root",
        // even if it exists. Thus, we only do fallback to "root/settings/override" if the folder in
        // "root_*" does not exist or is not a directory

        $sourceFolder = $legacyExtensionPath . '/root_' . $this->environment . '/settings/override';
        if (!$this->fileSystem->exists($sourceFolder) || !is_dir($sourceFolder)) {
            $sourceFolder = $legacyExtensionPath . '/root/settings/override';
            if (!$this->fileSystem->exists($sourceFolder) || !is_dir($sourceFolder)) {
                return;
            }
        }

        $this->verifyAndSymlinkDirectory($sourceFolder, $legacyRootDir . '/settings/override', $output);
    }