public static function initializeCompatibilityLayer(ClassLoader $classLoader)
    {
        $typo3Branch = '95';
        if (method_exists(Bootstrap::class, 'setCacheHashOptions')) {
            $typo3Branch = '87';
        }
        if ($typo3Branch === '95') {
            return;
        }
        $classLoader = self::$nonComposerCompatClassLoader ?? $classLoader;
        $compatibilityNamespace = 'Helhum\\Typo3Console\\TYPO3v' . $typo3Branch . '\\';
        spl_autoload_register(function ($className) use ($classLoader, $compatibilityNamespace) {
            if (strpos($className, 'Helhum\\Typo3Console\\') !== 0) {
                // We don't care about classes that are not within our namespace
                return;
            }
            $compatibilityClassName = str_replace('Helhum\\Typo3Console\\', $compatibilityNamespace, $className);
            if ($file = $classLoader->findFile($compatibilityClassName)) {
                require $file;
                class_alias($compatibilityClassName, $className);
            }
        }, true, true);
    }