Fix method name for php5
parent
1aec1c1fc8
commit
bf1ddaa298
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -154,6 +154,6 @@ EOT
|
|||
);
|
||||
}
|
||||
|
||||
return RepositoryFactory::default($this->getIO());
|
||||
return RepositoryFactory::defaultRepos($this->getIO());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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())
|
||||
));
|
||||
}
|
||||
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue