public static function create(IOInterface $io, Composer $composer, InputInterface $input): BaseInstaller
    {
        $config    = $composer->getConfig();
        $installer = new BaseInstaller(
            $io,
            $config,
            $composer->getPackage(),
            $composer->getDownloadManager(),
            $composer->getRepositoryManager(),
            $composer->getLocker(),
            $composer->getInstallationManager(),
            $composer->getEventDispatcher(),
            $composer->getAutoloadGenerator()
        );

        [$preferSource, $preferDist] = self::getPreferredInstallOptions($config, $input);

        $optimize      = self::getOption($input, 'optimize-autoloader')    || (bool) $config->get('optimize-autoloader');
        $authoritative = self::getOption($input, 'classmap-authoritative') || (bool) $config->get('classmap-authoritative');
        $apcu          = self::getOption($input, 'apcu-autoloader')        || (bool) $config->get('apcu-autoloader');

        $installer
            ->disablePlugins()
            ->setPreferSource($preferSource)
            ->setPreferDist($preferDist)
            ->setDryRun(self::getOption($input, 'dry-run'))
            ->setVerbose(self::getOption($input, 'verbose'))
            ->setDevMode(! self::getOption($input, 'no-dev'))
            ->setSuggestedPackagesReporter(new SuggestedPackagesReporter(new NullIO()))
            ->setDumpAutoloader(! self::getOption($input, 'no-autoloader'))
            ->setRunScripts(! self::getOption($input, 'no-scripts'))
            ->setOptimizeAutoloader($optimize)
            ->setClassMapAuthoritative($authoritative)
            ->setApcuAutoloader($apcu)
            ->setIgnorePlatformRequirements(self::getOption($input, 'ignore-platform-reqs'))
            ->setUpdate(true);

        return $installer;
    }