public static function create(Config $config, Composer $composer, PackageInterface $package, $installDir = null, $section = 'ignore-files')
    {
        $installDir = static::getInstallDir($composer, $package, $installDir);
        $manager = new IgnoreManager($installDir);
        $config = $config->getArray($section);

        foreach ($config as $packageName => $patterns) {
            if ($packageName === $package->getName()) {
                static::addPatterns($manager, $patterns);

                break;
            }
        }

        return $manager;
    }