Fix ComposerRepository calls, fixes #475

main
Jordi Boggiano 12 years ago
parent 45b2165057
commit ea2d46bcff

@ -85,11 +85,11 @@ EOT
}
if (null === $repositoryUrl) {
$sourceRepo = new ComposerRepository(array('url' => 'http://packagist.org'));
$sourceRepo = new ComposerRepository(array('url' => 'http://packagist.org'), $this->getIO());
} elseif (".json" === substr($repositoryUrl, -5)) {
$sourceRepo = new FilesystemRepository(new JsonFile($repositoryUrl, new RemoteFilesystem($io)));
} elseif (0 === strpos($repositoryUrl, 'http')) {
$sourceRepo = new ComposerRepository(array('url' => $repositoryUrl));
$sourceRepo = new ComposerRepository(array('url' => $repositoryUrl), $this->getIO());
} else {
throw new \InvalidArgumentException("Invalid repository url given. Has to be a .json file or an http url.");
}

@ -229,7 +229,7 @@ EOT
if (!$this->repos) {
$this->repos = new CompositeRepository(array(
new PlatformRepository,
new ComposerRepository(array('url' => 'http://packagist.org'))
new ComposerRepository(array('url' => 'http://packagist.org'), $this->getIO())
));
}

@ -54,7 +54,8 @@ EOT
} else {
$output->writeln('No composer.json found in the current directory, showing packages from packagist.org');
$installedRepo = $platformRepo;
$repos = new CompositeRepository(array($installedRepo, new ComposerRepository(array('url' => 'http://packagist.org'))));
$packagist = new ComposerRepository(array('url' => 'http://packagist.org'), $this->getIO());
$repos = new CompositeRepository(array($installedRepo, $packagist));
}
$tokens = $input->getArgument('tokens');

@ -65,7 +65,8 @@ EOT
} else {
$output->writeln('No composer.json found in the current directory, showing packages from packagist.org');
$installedRepo = $platformRepo;
$repos = new CompositeRepository(array($installedRepo, new ComposerRepository(array('url' => 'http://packagist.org'))));
$packagist = new ComposerRepository(array('url' => 'http://packagist.org'), $this->getIO());
$repos = new CompositeRepository(array($installedRepo, $packagist));
}
// show single package or single version

Loading…
Cancel
Save