diff --git a/src/Composer/Command/ArchiveCommand.php b/src/Composer/Command/ArchiveCommand.php index 442b0db78..d9ff8479c 100644 --- a/src/Composer/Command/ArchiveCommand.php +++ b/src/Composer/Command/ArchiveCommand.php @@ -127,7 +127,7 @@ EOT $localRepo = $composer->getRepositoryManager()->getLocalRepository(); $repo = new CompositeRepository(array_merge(array($localRepo), $composer->getRepositoryManager()->getRepositories())); } else { - $defaultRepos = RepositoryFactory::default($this->getIO()); + $defaultRepos = RepositoryFactory::defaultRepos($this->getIO()); $io->writeError('No composer.json found in the current directory, searching packages from ' . implode(', ', array_keys($defaultRepos))); $repo = new CompositeRepository($defaultRepos); } diff --git a/src/Composer/Command/CreateProjectCommand.php b/src/Composer/Command/CreateProjectCommand.php index 744161727..01b04c8fc 100644 --- a/src/Composer/Command/CreateProjectCommand.php +++ b/src/Composer/Command/CreateProjectCommand.php @@ -244,7 +244,7 @@ EOT protected function installRootPackage(IOInterface $io, Config $config, $packageName, $directory = null, $packageVersion = null, $stability = 'stable', $preferSource = false, $preferDist = false, $installDevPackages = false, $repository = null, $disablePlugins = false, $noScripts = false, $keepVcs = false, $noProgress = false) { if (null === $repository) { - $sourceRepo = new CompositeRepository(RepositoryFactory::default($io, $config)); + $sourceRepo = new CompositeRepository(RepositoryFactory::defaultRepos($io, $config)); } else { $sourceRepo = RepositoryFactory::fromString($io, $config, $repository, true); } diff --git a/src/Composer/Command/HomeCommand.php b/src/Composer/Command/HomeCommand.php index a5c3fe0c7..35ea02eec 100644 --- a/src/Composer/Command/HomeCommand.php +++ b/src/Composer/Command/HomeCommand.php @@ -154,6 +154,6 @@ EOT ); } - return RepositoryFactory::default($this->getIO()); + return RepositoryFactory::defaultRepos($this->getIO()); } } diff --git a/src/Composer/Command/InitCommand.php b/src/Composer/Command/InitCommand.php index 08d8c7c91..a43f67768 100644 --- a/src/Composer/Command/InitCommand.php +++ b/src/Composer/Command/InitCommand.php @@ -345,7 +345,7 @@ EOT if (!$this->repos) { $this->repos = new CompositeRepository(array_merge( array(new PlatformRepository), - RepositoryFactory::default($this->getIO()) + RepositoryFactory::defaultRepos($this->getIO()) )); } diff --git a/src/Composer/Command/SearchCommand.php b/src/Composer/Command/SearchCommand.php index 5f0fb648b..a8325da29 100644 --- a/src/Composer/Command/SearchCommand.php +++ b/src/Composer/Command/SearchCommand.php @@ -63,7 +63,7 @@ EOT $installedRepo = new CompositeRepository(array($localRepo, $platformRepo)); $repos = new CompositeRepository(array_merge(array($installedRepo), $composer->getRepositoryManager()->getRepositories())); } else { - $defaultRepos = RepositoryFactory::default($io); + $defaultRepos = RepositoryFactory::defaultRepos($io); $io->writeError('No composer.json found in the current directory, showing packages from ' . implode(', ', array_keys($defaultRepos))); $installedRepo = $platformRepo; $repos = new CompositeRepository(array_merge(array($installedRepo), $defaultRepos)); diff --git a/src/Composer/Command/ShowCommand.php b/src/Composer/Command/ShowCommand.php index 9dad767f9..efcb50e68 100644 --- a/src/Composer/Command/ShowCommand.php +++ b/src/Composer/Command/ShowCommand.php @@ -107,7 +107,7 @@ EOT if ($composer) { $repos = new CompositeRepository($composer->getRepositoryManager()->getRepositories()); } else { - $defaultRepos = RepositoryFactory::default($io); + $defaultRepos = RepositoryFactory::defaultRepos($io); $repos = new CompositeRepository($defaultRepos); $io->writeError('No composer.json found in the current directory, showing available packages from ' . implode(', ', array_keys($defaultRepos))); } @@ -116,7 +116,7 @@ EOT $installedRepo = new CompositeRepository(array($localRepo, $platformRepo)); $repos = new CompositeRepository(array_merge(array($installedRepo), $composer->getRepositoryManager()->getRepositories())); } elseif ($input->getOption('all')) { - $defaultRepos = RepositoryFactory::default($io); + $defaultRepos = RepositoryFactory::defaultRepos($io); $io->writeError('No composer.json found in the current directory, showing available packages from ' . implode(', ', array_keys($defaultRepos))); $installedRepo = $platformRepo; $repos = new CompositeRepository(array_merge(array($installedRepo), $defaultRepos)); diff --git a/src/Composer/Factory.php b/src/Composer/Factory.php index e40d6b1bd..720a2f066 100644 --- a/src/Composer/Factory.php +++ b/src/Composer/Factory.php @@ -223,11 +223,11 @@ class Factory } /** - * @deprecated Use Composer\Repository\RepositoryFactory::default instead + * @deprecated Use Composer\Repository\RepositoryFactory::defaultRepos instead */ public static function createDefaultRepositories(IOInterface $io = null, Config $config = null, RepositoryManager $rm = null) { - return RepositoryFactory::default($io, $config, $rm); + return RepositoryFactory::defaultRepos($io, $config, $rm); } /** diff --git a/src/Composer/Package/Loader/RootPackageLoader.php b/src/Composer/Package/Loader/RootPackageLoader.php index b6617623d..e3b2dfe3e 100644 --- a/src/Composer/Package/Loader/RootPackageLoader.php +++ b/src/Composer/Package/Loader/RootPackageLoader.php @@ -142,7 +142,7 @@ class RootPackageLoader extends ArrayLoader $realPackage->setPreferStable((bool) $config['prefer-stable']); } - $repos = RepositoryFactory::default(null, $this->config, $this->manager); + $repos = RepositoryFactory::defaultRepos(null, $this->config, $this->manager); foreach ($repos as $repo) { $this->manager->addRepository($repo); } diff --git a/src/Composer/Repository/RepositoryFactory.php b/src/Composer/Repository/RepositoryFactory.php index dc2538c02..5eb743192 100644 --- a/src/Composer/Repository/RepositoryFactory.php +++ b/src/Composer/Repository/RepositoryFactory.php @@ -75,7 +75,7 @@ class RepositoryFactory /** * @return RepositoryInterface[] */ - public static function default(IOInterface $io = null, Config $config = null, RepositoryManager $rm = null) + public static function defaultRepos(IOInterface $io = null, Config $config = null, RepositoryManager $rm = null) { if (!$config) { $config = Factory::createConfig($io);