1
0
Fork 0
mirror of https://github.com/composer/composer synced 2025-05-09 00:22:53 +00:00

Add home config key and use it to create the cache instance

This commit is contained in:
Jordi Boggiano 2012-04-09 16:36:06 +02:00
parent 28d0f4a7c8
commit fc29487a2a
7 changed files with 40 additions and 33 deletions

View file

@ -19,6 +19,7 @@ use Composer\Package\PackageInterface;
use Composer\Package\AliasPackage;
use Composer\Package\Loader\ArrayLoader;
use Composer\IO\IOInterface;
use Composer\Config;
/**
* @author Jordi Boggiano <j.boggiano@seld.be>
@ -32,7 +33,7 @@ class VcsRepository extends ArrayRepository
protected $versionParser;
protected $type;
public function __construct(array $config, IOInterface $io, array $drivers = null)
public function __construct(array $repoConfig, IOInterface $io, Config $config = null, array $drivers = null)
{
$this->drivers = $drivers ?: array(
'github' => 'Composer\Repository\Vcs\GitHubDriver',
@ -43,9 +44,9 @@ class VcsRepository extends ArrayRepository
'hg' => 'Composer\Repository\Vcs\HgDriver',
);
$this->url = $config['url'];
$this->url = $repoConfig['url'];
$this->io = $io;
$this->type = isset($config['type']) ? $config['type'] : 'vcs';
$this->type = isset($repoConfig['type']) ? $repoConfig['type'] : 'vcs';
$this->verbose = $io->isVerbose();
}