1
0
Fork 0

Fix method name for php5

pull/4980/head
Jordi Boggiano 2016-02-29 17:51:34 +00:00
parent 1aec1c1fc8
commit bf1ddaa298
9 changed files with 11 additions and 11 deletions

View File

@ -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);
}

View File

@ -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);
}

View File

@ -154,6 +154,6 @@ EOT
);
}
return RepositoryFactory::default($this->getIO());
return RepositoryFactory::defaultRepos($this->getIO());
}
}

View File

@ -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())
));
}

View File

@ -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));

View File

@ -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));

View File

@ -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);
}
/**

View File

@ -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);
}

View File

@ -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);