1
0
Fork 0
mirror of https://github.com/composer/composer synced 2025-05-11 09:32:55 +00:00

Use RemoteFilesystem everywhere we do http requests

This commit is contained in:
Jordi Boggiano 2012-03-18 21:04:15 +01:00
parent d291d65faf
commit 7f65dd7409
7 changed files with 40 additions and 28 deletions

View file

@ -23,6 +23,7 @@ use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
use Composer\Json\JsonFile;
use Composer\Util\RemoteFilesystem;
/**
* Install a package as new project into new directory.
@ -86,7 +87,7 @@ EOT
if (null === $repositoryUrl) {
$sourceRepo = new ComposerRepository(array('url' => 'http://packagist.org'));
} elseif (".json" === substr($repositoryUrl, -5)) {
$sourceRepo = new FilesystemRepository(new JsonFile($repositoryUrl));
$sourceRepo = new FilesystemRepository(new JsonFile($repositoryUrl, new RemoteFilesystem($io)));
} elseif (0 === strpos($repositoryUrl, 'http')) {
$sourceRepo = new ComposerRepository(array('url' => $repositoryUrl));
} else {