mirror of
https://github.com/composer/composer
synced 2025-05-11 01:22:54 +00:00
Allows repositories to implement ConfigurableRepositoryInterface and thus provide getRepoConfigmethod
This commit is contained in:
parent
9e9c1917e1
commit
5b748eda6c
6 changed files with 60 additions and 5 deletions
|
@ -49,7 +49,7 @@ use Composer\Util\ProcessExecutor;
|
|||
* @author Samuel Roze <samuel.roze@gmail.com>
|
||||
* @author Johann Reinke <johann.reinke@gmail.com>
|
||||
*/
|
||||
class PathRepository extends ArrayRepository
|
||||
class PathRepository extends ArrayRepository implements ConfigurableRepositoryInterface
|
||||
{
|
||||
/**
|
||||
* @var ArrayLoader
|
||||
|
@ -66,6 +66,11 @@ class PathRepository extends ArrayRepository
|
|||
*/
|
||||
private $url;
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
private $repoConfig;
|
||||
|
||||
/**
|
||||
* @var ProcessExecutor
|
||||
*/
|
||||
|
@ -88,10 +93,16 @@ class PathRepository extends ArrayRepository
|
|||
$this->url = $repoConfig['url'];
|
||||
$this->process = new ProcessExecutor($io);
|
||||
$this->versionGuesser = new VersionGuesser($config, $this->process, new VersionParser());
|
||||
$this->repoConfig = $repoConfig;
|
||||
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
public function getRepoConfig()
|
||||
{
|
||||
return $this->repoConfig;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes path repository.
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue