private function prepareComposerFallbackLoader(EnumeratingClassLoader $enumLoader, $baseDir, $composer)
    {
        $vendorDir = $baseDir . DIRECTORY_SEPARATOR . 'vendor';
        if (isset($composer['extra']['vendor-dir'])) {
            $vendorDir = $baseDir . DIRECTORY_SEPARATOR . $composer['extra']['vendor-dir'];
        }

        if (!is_dir($vendorDir)) {
            return;
        }
        $loader = new ClassLoader();

        if ($map = $this->includeIfExists($vendorDir . '/composer/autoload_namespaces.php')) {
            foreach ($map as $namespace => $path) {
                $loader->set($namespace, $path);
            }
        }

        if ($map = $this->includeIfExists($vendorDir . '/composer/autoload_psr4.php')) {
            foreach ($map as $namespace => $path) {
                $loader->setPsr4($namespace, $path);
            }
        }
        if ($classMap = $this->includeIfExists($vendorDir . '/composer/autoload_classmap.php')) {
            $loader->addClassMap($classMap);
        }

        $enumLoader->add(array($loader, 'loadClass'), 'composer.fallback');
    }