public static function addRepository(IOInterface $io, RepositoryManager $rm, array &$repos, $name, array $repoConfig, Pool $pool = null)
    {
        $repoConfig['name'] = $name;
        $repo = $rm->createRepository($repoConfig['type'], $repoConfig);

        return static::addRepositoryInstance($io, $rm, $repos, $name, $repo, $pool);
    }