mirror of
https://github.com/composer/composer
synced 2025-05-10 09:02:59 +00:00
Handle --dev installs/updates
This commit is contained in:
parent
a04647aa8c
commit
89e095b4b5
17 changed files with 299 additions and 216 deletions
|
@ -25,6 +25,7 @@ use Composer\Config;
|
|||
class RepositoryManager
|
||||
{
|
||||
private $localRepository;
|
||||
private $localDevRepository;
|
||||
private $repositories = array();
|
||||
private $repositoryClasses = array();
|
||||
private $io;
|
||||
|
@ -140,4 +141,34 @@ class RepositoryManager
|
|||
{
|
||||
return $this->localRepository;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets localDev repository for the project.
|
||||
*
|
||||
* @param RepositoryInterface $repository repository instance
|
||||
*/
|
||||
public function setLocalDevRepository(RepositoryInterface $repository)
|
||||
{
|
||||
$this->localDevRepository = $repository;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns localDev repository for the project.
|
||||
*
|
||||
* @return RepositoryInterface
|
||||
*/
|
||||
public function getLocalDevRepository()
|
||||
{
|
||||
return $this->localDevRepository;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns all local repositories for the project.
|
||||
*
|
||||
* @return array[RepositoryInterface]
|
||||
*/
|
||||
public function getLocalRepositories()
|
||||
{
|
||||
return array($this->localRepository, $this->localDevRepository);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue