Minor refactoring of RootPackageRepo
parent
71a98d8a7e
commit
f35cd8948a
|
@ -54,7 +54,7 @@ EOT
|
|||
$composer = $this->getComposer();
|
||||
|
||||
$installedRepos = array(
|
||||
new RootPackageRepository(array(clone $composer->getPackage())),
|
||||
new RootPackageRepository(clone $composer->getPackage()),
|
||||
);
|
||||
|
||||
$locker = $composer->getLocker();
|
||||
|
|
|
@ -260,7 +260,7 @@ class Installer
|
|||
$installedRepos = array(
|
||||
$this->locker->getLockedRepository($this->devMode),
|
||||
$this->createPlatformRepo(false),
|
||||
new RootPackageRepository(array(clone $this->package)),
|
||||
new RootPackageRepository(clone $this->package),
|
||||
);
|
||||
$this->suggestedPackagesReporter->outputMinimalistic(new CompositeRepository($installedRepos));
|
||||
}
|
||||
|
@ -706,7 +706,7 @@ class Installer
|
|||
$this->fixedRootPackage->setDevRequires(array());
|
||||
|
||||
$repositorySet = new RepositorySet($minimumStability, $stabilityFlags, $rootAliases, $this->package->getReferences(), $rootRequires);
|
||||
$repositorySet->addRepository(new RootPackageRepository(array($this->fixedRootPackage)));
|
||||
$repositorySet->addRepository(new RootPackageRepository($this->fixedRootPackage));
|
||||
$repositorySet->addRepository($platformRepo);
|
||||
if ($this->additionalFixedRepository) {
|
||||
$repositorySet->addRepository($this->additionalFixedRepository);
|
||||
|
|
|
@ -12,6 +12,8 @@
|
|||
|
||||
namespace Composer\Repository;
|
||||
|
||||
use Composer\Package\RootPackageInterface;
|
||||
|
||||
/**
|
||||
* Root package repository.
|
||||
*
|
||||
|
@ -21,6 +23,11 @@ namespace Composer\Repository;
|
|||
*/
|
||||
class RootPackageRepository extends ArrayRepository
|
||||
{
|
||||
public function __construct(RootPackageInterface $package)
|
||||
{
|
||||
parent::__construct(array($package));
|
||||
}
|
||||
|
||||
public function getRepoName()
|
||||
{
|
||||
return 'root package repo';
|
||||
|
|
Loading…
Reference in New Issue