diff --git a/composer.json b/composer.json index 6fd0d219f..6d9299258 100644 --- a/composer.json +++ b/composer.json @@ -25,7 +25,7 @@ "php": ">=5.3.2", "justinrainbow/json-schema": "1.1.*", "seld/jsonlint": "1.*", - "symfony/console": "~2.1@dev", + "symfony/console": "~2.3@dev", "symfony/finder": "~2.1", "symfony/process": "~2.1@dev" }, diff --git a/composer.lock b/composer.lock index 661c74f91..c691ce21e 100644 --- a/composer.lock +++ b/composer.lock @@ -3,7 +3,7 @@ "This file locks the dependencies of your project to a known state", "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file" ], - "hash": "38828459a269ef0e409883721853d7fe", + "hash": "01e4c62c851ae821a789f70484fed8a6", "packages": [ { "name": "justinrainbow/json-schema", @@ -84,12 +84,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/Console.git", - "reference": "f22b036677ee58fdb256f2404c95a9f401b767cf" + "reference": "7bcef9e062cc89b893a35c67a7456d41cb50113d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Console/zipball/f22b036677ee58fdb256f2404c95a9f401b767cf", - "reference": "f22b036677ee58fdb256f2404c95a9f401b767cf", + "url": "https://api.github.com/repos/symfony/Console/zipball/7bcef9e062cc89b893a35c67a7456d41cb50113d", + "reference": "7bcef9e062cc89b893a35c67a7456d41cb50113d", "shasum": "" }, "require": { @@ -125,7 +125,7 @@ ], "description": "Symfony Console Component", "homepage": "http://symfony.com", - "time": "2013-04-23 16:54:01" + "time": "2013-04-25 13:33:44" }, { "name": "symfony/finder", @@ -181,12 +181,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/Process.git", - "reference": "a2a22e359c8c6c6a44ec2d158d0865e9a94348b1" + "reference": "d55770ab111a89ee92773eb16f8acef9b09870f5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Process/zipball/a2a22e359c8c6c6a44ec2d158d0865e9a94348b1", - "reference": "a2a22e359c8c6c6a44ec2d158d0865e9a94348b1", + "url": "https://api.github.com/repos/symfony/Process/zipball/d55770ab111a89ee92773eb16f8acef9b09870f5", + "reference": "d55770ab111a89ee92773eb16f8acef9b09870f5", "shasum": "" }, "require": { @@ -219,7 +219,7 @@ ], "description": "Symfony Process Component", "homepage": "http://symfony.com", - "time": "2013-04-23 20:53:10" + "time": "2013-04-25 13:23:11" } ], "packages-dev": [ diff --git a/src/Composer/Command/InstallCommand.php b/src/Composer/Command/InstallCommand.php index 5be76257b..85c21462a 100644 --- a/src/Composer/Command/InstallCommand.php +++ b/src/Composer/Command/InstallCommand.php @@ -38,7 +38,7 @@ class InstallCommand extends Command new InputOption('no-custom-installers', null, InputOption::VALUE_NONE, 'Disables all custom installers.'), new InputOption('no-scripts', null, InputOption::VALUE_NONE, 'Skips the execution of all scripts defined in composer.json file.'), new InputOption('no-progress', null, InputOption::VALUE_NONE, 'Do not output download progress.'), - new InputOption('verbose', 'v', InputOption::VALUE_NONE, 'Shows more details including new commits pulled in when updating packages.'), + new InputOption('verbose', 'v|vv|vvv', InputOption::VALUE_NONE, 'Shows more details including new commits pulled in when updating packages.'), new InputOption('optimize-autoloader', 'o', InputOption::VALUE_NONE, 'Optimize autoloader during autoloader dump') )) ->setHelp(<<setName('status') ->setDescription('Show a list of locally modified packages') ->setDefinition(array( - new InputOption('verbose', 'v', InputOption::VALUE_NONE, 'Show modified files for each directory that contains changes.'), + new InputOption('verbose', 'v|vv|vvv', InputOption::VALUE_NONE, 'Show modified files for each directory that contains changes.'), )) ->setHelp(<<setHelp(<<output->getVerbosity() === OutputInterface::VERBOSITY_VERBOSE; + return $this->output->getVerbosity() >= OutputInterface::VERBOSITY_VERBOSE; + } + + /** + * {@inheritDoc} + */ + public function isVeryVerbose() + { + return $this->output->getVerbosity() >= OutputInterface::VERBOSITY_VERY_VERBOSE; + } + + /** + * {@inheritDoc} + */ + public function isDebug() + { + return $this->output->getVerbosity() >= OutputInterface::VERBOSITY_DEBUG; } /** diff --git a/src/Composer/IO/IOInterface.php b/src/Composer/IO/IOInterface.php index 1cb896c5f..fee736b19 100644 --- a/src/Composer/IO/IOInterface.php +++ b/src/Composer/IO/IOInterface.php @@ -27,12 +27,26 @@ interface IOInterface public function isInteractive(); /** - * Is this input verbose? + * Is this output verbose? * * @return bool */ public function isVerbose(); + /** + * Is the output very verbose? + * + * @return bool + */ + public function isVeryVerbose(); + + /** + * Is the output in debug verbosity? + * + * @return bool + */ + public function isDebug(); + /** * Is this output decorated? * diff --git a/src/Composer/IO/NullIO.php b/src/Composer/IO/NullIO.php index 670edd4b5..3895d8b7f 100644 --- a/src/Composer/IO/NullIO.php +++ b/src/Composer/IO/NullIO.php @@ -35,6 +35,22 @@ class NullIO implements IOInterface return false; } + /** + * {@inheritDoc} + */ + public function isVeryVerbose() + { + return false; + } + + /** + * {@inheritDoc} + */ + public function isDebug() + { + return false; + } + /** * {@inheritDoc} */ diff --git a/src/Composer/Util/RemoteFilesystem.php b/src/Composer/Util/RemoteFilesystem.php index 0a54c5285..7961ab91f 100644 --- a/src/Composer/Util/RemoteFilesystem.php +++ b/src/Composer/Util/RemoteFilesystem.php @@ -18,6 +18,7 @@ use Composer\Downloader\TransportException; /** * @author François Pluchino + * @author Jordi Boggiano */ class RemoteFilesystem { @@ -101,6 +102,9 @@ class RemoteFilesystem $this->lastProgress = null; $options = $this->getOptionsForUrl($originUrl, $additionalOptions); + if ($this->io->isDebug()) { + $this->io->write('Downloading '.$fileUrl); + } if (isset($options['github-token'])) { $fileUrl .= (false === strpos($fileUrl, '?') ? '?' : '&') . 'access_token='.$options['github-token']; unset($options['github-token']);