protected function createClassExtension($parentClass, $moduleClass)
    {
        if (!\OxidEsales\Eshop\Core\NamespaceInformationProvider::isNamespacedClass($moduleClass)) {
            return $this->backwardsCompatibleCreateClassExtension($parentClass, $moduleClass);
        }

        /**
         * Test if the class file could be loaded
         */
        /** @var \Composer\Autoload\ClassLoader $composerClassLoader */
        $composerClassLoader = include VENDOR_PATH . 'autoload.php';
        if (!$this->isUnitTest() && // In unit test some classes are created dynamically, so the files would not exist :-(
            !strpos($moduleClass, '_parent') &&
            !$composerClassLoader->findFile($moduleClass)) {
            $this->handleSpecialCases($parentClass);
            $this->onModuleExtensionCreationError($moduleClass);

            return false;
        }

        if (!class_exists($moduleClass, false)) {
            $moduleClassParentAlias = $moduleClass . "_parent";
            if (!class_exists($moduleClassParentAlias, false)) {
                class_alias($parentClass, $moduleClassParentAlias);
            }
        }

        return true;
    }