From 15258709f36f2e434fc7710271265adca6e036f9 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Wed, 9 Sep 2015 15:07:59 +0200 Subject: [PATCH 1/2] Minor tweaks --- src/Symfony/Installer/DownloadCommand.php | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/Symfony/Installer/DownloadCommand.php b/src/Symfony/Installer/DownloadCommand.php index c02459f..119d465 100644 --- a/src/Symfony/Installer/DownloadCommand.php +++ b/src/Symfony/Installer/DownloadCommand.php @@ -89,9 +89,12 @@ protected function download() /** @var ProgressBar|null $progressBar */ $progressBar = null; - $downloadCallback = function ($size, $downloaded, $client, $request, Response $response) use (&$progressBar) { - // Don't initialize the progress bar for redirects as the size is much smaller - if ($response->getStatusCode() >= 300) { + $downloadCallback = function (ProgressEvent $event) use (&$progressBar) { + $downloadSize = $event->downloadSize; + $downloaded = $event->downloaded; + + // progress bar is only displayed for files larger than 1MB + if ($downloadSize < 1 * 1024 * 1024) { return; } @@ -103,9 +106,9 @@ protected function download() return str_pad($this->formatSize($bar->getStep()), 11, ' ', STR_PAD_LEFT); }); - $progressBar = new ProgressBar($this->output, $size); + $progressBar = new ProgressBar($this->output, $downloadSize); $progressBar->setFormat('%current%/%max% %bar% %percent:3s%%'); - $progressBar->setRedrawFrequency(max(1, floor($size / 1000))); + $progressBar->setRedrawFrequency(max(1, floor($downloadSize / 1000))); $progressBar->setBarWidth(60); if (!defined('PHP_WINDOWS_VERSION_BUILD')) { From 268e9c12073988d7a3b4584c88e0b04ff5c012cb Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Thu, 10 Sep 2015 13:33:33 +0200 Subject: [PATCH 2/2] Restored a removed commit --- composer.json | 3 +- composer.lock | 1136 +++------------------ src/Symfony/Installer/DownloadCommand.php | 8 +- 3 files changed, 128 insertions(+), 1019 deletions(-) diff --git a/composer.json b/composer.json index f96ba7f..4c3ad1c 100644 --- a/composer.json +++ b/composer.json @@ -14,8 +14,7 @@ }, "require": { "php": ">=5.4.0", - "guzzlehttp/guzzle": "~4.0", - "guzzlehttp/progress-subscriber": "~1.1", + "guzzlehttp/guzzle": "~5.0", "symfony/console": "~2.5", "symfony/filesystem": "~2.5", "raulfraile/distill": "~0.9,!=0.9.3,!=0.9.4" diff --git a/composer.lock b/composer.lock index c2497b8..7c48514 100644 --- a/composer.lock +++ b/composer.lock @@ -4,48 +4,41 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "cc7c72812289474d1cda50ff705579f2", + "hash": "13fe84898883f8398e179e43a0716b31", "packages": [ { "name": "guzzlehttp/guzzle", - "version": "4.2.3", + "version": "5.3.0", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "66fd916e9f9130bc22c51450476823391cb2f67c" + "reference": "f3c8c22471cb55475105c14769644a49c3262b93" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/66fd916e9f9130bc22c51450476823391cb2f67c", - "reference": "66fd916e9f9130bc22c51450476823391cb2f67c", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/f3c8c22471cb55475105c14769644a49c3262b93", + "reference": "f3c8c22471cb55475105c14769644a49c3262b93", "shasum": "" }, "require": { - "ext-json": "*", - "guzzlehttp/streams": "~2.1", + "guzzlehttp/ringphp": "^1.1", "php": ">=5.4.0" }, "require-dev": { "ext-curl": "*", - "phpunit/phpunit": "~4.0", - "psr/log": "~1.0" - }, - "suggest": { - "ext-curl": "Guzzle will use specific adapters if cURL is present" + "phpunit/phpunit": "^4.0", + "psr/log": "^1.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.2-dev" + "dev-master": "5.0-dev" } }, "autoload": { "psr-4": { "GuzzleHttp\\": "src/" - }, - "files": [ - "src/functions.php" - ] + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -69,33 +62,43 @@ "rest", "web service" ], - "time": "2014-10-05 19:29:14" + "time": "2015-05-20 03:47:55" }, { - "name": "guzzlehttp/progress-subscriber", + "name": "guzzlehttp/ringphp", "version": "1.1.0", "source": { "type": "git", - "url": "https://github.com/guzzle/progress-subscriber.git", - "reference": "82a142faf0a85bfd9b6a19164a26647def550728" + "url": "https://github.com/guzzle/RingPHP.git", + "reference": "dbbb91d7f6c191e5e405e900e3102ac7f261bc0b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/progress-subscriber/zipball/82a142faf0a85bfd9b6a19164a26647def550728", - "reference": "82a142faf0a85bfd9b6a19164a26647def550728", + "url": "https://api.github.com/repos/guzzle/RingPHP/zipball/dbbb91d7f6c191e5e405e900e3102ac7f261bc0b", + "reference": "dbbb91d7f6c191e5e405e900e3102ac7f261bc0b", "shasum": "" }, "require": { - "guzzlehttp/guzzle": "~4.0", - "php": ">=5.4.0" + "guzzlehttp/streams": "~3.0", + "php": ">=5.4.0", + "react/promise": "~2.0" }, "require-dev": { + "ext-curl": "*", "phpunit/phpunit": "~4.0" }, + "suggest": { + "ext-curl": "Guzzle will use specific adapters if cURL is present" + }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + }, "autoload": { "psr-4": { - "GuzzleHttp\\Subscriber\\Progress\\": "src/" + "GuzzleHttp\\Ring\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -109,26 +112,21 @@ "homepage": "https://github.com/mtdowling" } ], - "description": "Emits upload and download progress events", - "homepage": "http://guzzlephp.org/", - "keywords": [ - "Guzzle", - "http" - ], - "time": "2014-08-01 23:12:01" + "description": "Provides a simple API and specification that abstracts away the details of HTTP into a single PHP function.", + "time": "2015-05-20 03:37:09" }, { "name": "guzzlehttp/streams", - "version": "2.1.0", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/guzzle/streams.git", - "reference": "f91b721d73f0e561410903b3b3c90a5d0e40b534" + "reference": "47aaa48e27dae43d39fc1cea0ccf0d84ac1a2ba5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/streams/zipball/f91b721d73f0e561410903b3b3c90a5d0e40b534", - "reference": "f91b721d73f0e561410903b3b3c90a5d0e40b534", + "url": "https://api.github.com/repos/guzzle/streams/zipball/47aaa48e27dae43d39fc1cea0ccf0d84ac1a2ba5", + "reference": "47aaa48e27dae43d39fc1cea0ccf0d84ac1a2ba5", "shasum": "" }, "require": { @@ -140,16 +138,13 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-master": "3.0-dev" } }, "autoload": { "psr-4": { "GuzzleHttp\\Stream\\": "src/" - }, - "files": [ - "src/functions.php" - ] + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -162,26 +157,26 @@ "homepage": "https://github.com/mtdowling" } ], - "description": "Provides a simple abstraction over streams of data (Guzzle 4+)", + "description": "Provides a simple abstraction over streams of data", "homepage": "http://guzzlephp.org/", "keywords": [ "Guzzle", "stream" ], - "time": "2014-08-17 21:15:53" + "time": "2014-10-12 19:18:40" }, { "name": "pimple/pimple", - "version": "v3.0.0", + "version": "v3.0.1", "source": { "type": "git", "url": "https://github.com/silexphp/Pimple.git", - "reference": "876bf0899d01feacd2a2e83f04641e51350099ef" + "reference": "3313af5935dbc560fab845b76a1ca351b47855af" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/silexphp/Pimple/zipball/876bf0899d01feacd2a2e83f04641e51350099ef", - "reference": "876bf0899d01feacd2a2e83f04641e51350099ef", + "url": "https://api.github.com/repos/silexphp/Pimple/zipball/3313af5935dbc560fab845b76a1ca351b47855af", + "reference": "3313af5935dbc560fab845b76a1ca351b47855af", "shasum": "" }, "require": { @@ -214,20 +209,20 @@ "container", "dependency injection" ], - "time": "2014-07-24 09:48:15" + "time": "2015-07-30 09:57:46" }, { "name": "raulfraile/distill", - "version": "v0.9.2", + "version": "v0.9.8", "source": { "type": "git", "url": "https://github.com/raulfraile/distill.git", - "reference": "c5bf5a5c76dbf2d7287bdc6c8beda11d27139bca" + "reference": "1920a69bcba9b0834cfe9eb93fe55e19b1a04422" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/raulfraile/distill/zipball/c5bf5a5c76dbf2d7287bdc6c8beda11d27139bca", - "reference": "c5bf5a5c76dbf2d7287bdc6c8beda11d27139bca", + "url": "https://api.github.com/repos/raulfraile/distill/zipball/1920a69bcba9b0834cfe9eb93fe55e19b1a04422", + "reference": "1920a69bcba9b0834cfe9eb93fe55e19b1a04422", "shasum": "" }, "require": { @@ -238,7 +233,8 @@ }, "require-dev": { "mockery/mockery": "0.9.1", - "raulfraile/ladybug": "~1.0" + "raulfraile/ladybug": "~1.0", + "symfony/finder": "~2.4" }, "suggest": { "ext-rar": "Allows to uncompress rar files using RarArchive", @@ -282,93 +278,38 @@ "xz", "zip" ], - "time": "2014-12-11 23:09:12" + "time": "2014-12-23 07:44:16" }, { - "name": "symfony/console", - "version": "v2.6.1", - "target-dir": "Symfony/Component/Console", + "name": "react/promise", + "version": "v2.2.1", "source": { "type": "git", - "url": "https://github.com/symfony/Console.git", - "reference": "ef825fd9f809d275926547c9e57cbf14968793e8" + "url": "https://github.com/reactphp/promise.git", + "reference": "3b6fca09c7d56321057fa8867c8dbe1abf648627" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Console/zipball/ef825fd9f809d275926547c9e57cbf14968793e8", - "reference": "ef825fd9f809d275926547c9e57cbf14968793e8", + "url": "https://api.github.com/repos/reactphp/promise/zipball/3b6fca09c7d56321057fa8867c8dbe1abf648627", + "reference": "3b6fca09c7d56321057fa8867c8dbe1abf648627", "shasum": "" }, "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "psr/log": "~1.0", - "symfony/event-dispatcher": "~2.1", - "symfony/process": "~2.1" - }, - "suggest": { - "psr/log": "For using the console logger", - "symfony/event-dispatcher": "", - "symfony/process": "" + "php": ">=5.4.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.6-dev" + "dev-master": "2.0-dev" } }, "autoload": { - "psr-0": { - "Symfony\\Component\\Console\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" + "psr-4": { + "React\\Promise\\": "src/" }, - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - } - ], - "description": "Symfony Console Component", - "homepage": "http://symfony.com", - "time": "2014-12-02 20:19:20" - }, - { - "name": "symfony/filesystem", - "version": "v2.6.1", - "target-dir": "Symfony/Component/Filesystem", - "source": { - "type": "git", - "url": "https://github.com/symfony/Filesystem.git", - "reference": "ff6efc95256cb33031933729e68b01d720b5436b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/Filesystem/zipball/ff6efc95256cb33031933729e68b01d720b5436b", - "reference": "ff6efc95256cb33031933729e68b01d720b5436b", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.6-dev" - } - }, - "autoload": { - "psr-0": { - "Symfony\\Component\\Filesystem\\": "" - } + "files": [ + "src/functions_include.php" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -376,37 +317,40 @@ ], "authors": [ { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - }, - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "name": "Jan Sorgalla", + "email": "jsorgalla@gmail.com" } ], - "description": "Symfony Filesystem Component", - "homepage": "http://symfony.com", - "time": "2014-12-02 20:19:20" + "description": "A lightweight implementation of CommonJS Promises/A for PHP", + "time": "2015-07-03 13:48:55" }, { - "name": "symfony/process", + "name": "symfony/console", "version": "v2.7.4", "source": { "type": "git", - "url": "https://github.com/symfony/Process.git", - "reference": "f7b3f73f70a7f8f49a1c838dc3debbf054732d8e" + "url": "https://github.com/symfony/Console.git", + "reference": "9ff9032151186bd66ecee727d728f1319f52d1d8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Process/zipball/f7b3f73f70a7f8f49a1c838dc3debbf054732d8e", - "reference": "f7b3f73f70a7f8f49a1c838dc3debbf054732d8e", + "url": "https://api.github.com/repos/symfony/Console/zipball/9ff9032151186bd66ecee727d728f1319f52d1d8", + "reference": "9ff9032151186bd66ecee727d728f1319f52d1d8", "shasum": "" }, "require": { "php": ">=5.3.9" }, "require-dev": { - "symfony/phpunit-bridge": "~2.7" + "psr/log": "~1.0", + "symfony/event-dispatcher": "~2.1", + "symfony/phpunit-bridge": "~2.7", + "symfony/process": "~2.1" + }, + "suggest": { + "psr/log": "For using the console logger", + "symfony/event-dispatcher": "", + "symfony/process": "" }, "type": "library", "extra": { @@ -416,7 +360,7 @@ }, "autoload": { "psr-4": { - "Symfony\\Component\\Process\\": "" + "Symfony\\Component\\Console\\": "" } }, "notification-url": "https://packagist.org/downloads/", @@ -433,106 +377,39 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony Process Component", + "description": "Symfony Console Component", "homepage": "https://symfony.com", - "time": "2015-08-27 06:45:45" - } - ], - "packages-dev": [ + "time": "2015-09-03 11:40:38" + }, { - "name": "doctrine/annotations", - "version": "v1.2.7", + "name": "symfony/filesystem", + "version": "v2.7.4", "source": { "type": "git", - "url": "https://github.com/doctrine/annotations.git", - "reference": "f25c8aab83e0c3e976fd7d19875f198ccf2f7535" + "url": "https://github.com/symfony/Filesystem.git", + "reference": "f079e9933799929584200b9a926f72f29e291654" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/annotations/zipball/f25c8aab83e0c3e976fd7d19875f198ccf2f7535", - "reference": "f25c8aab83e0c3e976fd7d19875f198ccf2f7535", + "url": "https://api.github.com/repos/symfony/Filesystem/zipball/f079e9933799929584200b9a926f72f29e291654", + "reference": "f079e9933799929584200b9a926f72f29e291654", "shasum": "" }, "require": { - "doctrine/lexer": "1.*", - "php": ">=5.3.2" + "php": ">=5.3.9" }, "require-dev": { - "doctrine/cache": "1.*", - "phpunit/phpunit": "4.*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.3.x-dev" - } - }, - "autoload": { - "psr-0": { - "Doctrine\\Common\\Annotations\\": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "Docblock Annotations Parser", - "homepage": "http://www.doctrine-project.org", - "keywords": [ - "annotations", - "docblock", - "parser" - ], - "time": "2015-08-31 12:32:49" - }, - { - "name": "doctrine/lexer", - "version": "v1.0.1", - "source": { - "type": "git", - "url": "https://github.com/doctrine/lexer.git", - "reference": "83893c552fd2045dd78aef794c31e694c37c0b8c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/lexer/zipball/83893c552fd2045dd78aef794c31e694c37c0b8c", - "reference": "83893c552fd2045dd78aef794c31e694c37c0b8c", - "shasum": "" - }, - "require": { - "php": ">=5.3.2" + "symfony/phpunit-bridge": "~2.7" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "2.7-dev" } }, "autoload": { - "psr-0": { - "Doctrine\\Common\\Lexer\\": "lib/" + "psr-4": { + "Symfony\\Component\\Filesystem\\": "" } }, "notification-url": "https://packagist.org/downloads/", @@ -541,119 +418,47 @@ ], "authors": [ { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" + "name": "Fabien Potencier", + "email": "fabien@symfony.com" }, { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "Base library for a lexer that can be used in Top-Down, Recursive Descent Parsers.", - "homepage": "http://www.doctrine-project.org", - "keywords": [ - "lexer", - "parser" - ], - "time": "2014-09-09 13:34:57" - }, - { - "name": "herrera-io/annotations", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/kherge-abandoned/php-annotations.git", - "reference": "7d8b9a536da7f12aad8de7f28b2cb5266bde8da1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/kherge-abandoned/php-annotations/zipball/7d8b9a536da7f12aad8de7f28b2cb5266bde8da1", - "reference": "7d8b9a536da7f12aad8de7f28b2cb5266bde8da1", - "shasum": "" - }, - "require": { - "doctrine/annotations": "~1.0", - "php": ">=5.3.3" - }, - "require-dev": { - "herrera-io/phpunit-test-case": "1.*", - "phpunit/phpunit": "3.7.*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "psr-0": { - "Herrera\\Annotations": "src/lib" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Kevin Herrera", - "email": "kevin@herrera.io", - "homepage": "http://kevin.herrera.io" + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "A tokenizer for Doctrine annotations.", - "homepage": "https://github.com/herrera-io/php-annotations", - "keywords": [ - "annotations", - "doctrine", - "tokenizer" - ], - "time": "2014-02-03 17:34:08" + "description": "Symfony Filesystem Component", + "homepage": "https://symfony.com", + "time": "2015-08-27 07:03:44" }, { - "name": "herrera-io/box", - "version": "1.6.1", + "name": "symfony/process", + "version": "v2.7.4", "source": { "type": "git", - "url": "https://github.com/box-project/box2-lib.git", - "reference": "b55dceb5c65cc831e94ec0786b0b9b15f1103e8e" + "url": "https://github.com/symfony/Process.git", + "reference": "f7b3f73f70a7f8f49a1c838dc3debbf054732d8e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/box-project/box2-lib/zipball/b55dceb5c65cc831e94ec0786b0b9b15f1103e8e", - "reference": "b55dceb5c65cc831e94ec0786b0b9b15f1103e8e", + "url": "https://api.github.com/repos/symfony/Process/zipball/f7b3f73f70a7f8f49a1c838dc3debbf054732d8e", + "reference": "f7b3f73f70a7f8f49a1c838dc3debbf054732d8e", "shasum": "" }, "require": { - "ext-phar": "*", - "phine/path": "~1.0", - "php": ">=5.3.3", - "tedivm/jshrink": "~1.0" + "php": ">=5.3.9" }, "require-dev": { - "herrera-io/annotations": "~1.0", - "herrera-io/phpunit-test-case": "1.*", - "mikey179/vfsstream": "1.1.0", - "phpseclib/phpseclib": "~0.3", - "phpunit/phpunit": "3.7.*" - }, - "suggest": { - "herrera-io/annotations": "For compacting annotated docblocks.", - "phpseclib/phpseclib": "For verifying OpenSSL signed phars without the phar extension." + "symfony/phpunit-bridge": "~2.7" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-master": "2.7-dev" } }, "autoload": { - "psr-0": { - "Herrera\\Box": "src/lib" + "psr-4": { + "Symfony\\Component\\Process\\": "" } }, "notification-url": "https://packagist.org/downloads/", @@ -662,715 +467,20 @@ ], "authors": [ { - "name": "Kevin Herrera", - "email": "kevin@herrera.io", - "homepage": "http://kevin.herrera.io" - } - ], - "description": "A library for simplifying the PHAR build process.", - "homepage": "https://github.com/box-project/box2-lib", - "keywords": [ - "phar" - ], - "time": "2014-12-03 23:26:45" - }, - { - "name": "herrera-io/json", - "version": "1.0.3", - "source": { - "type": "git", - "url": "https://github.com/kherge-abandoned/php-json.git", - "reference": "60c696c9370a1e5136816ca557c17f82a6fa83f1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/kherge-abandoned/php-json/zipball/60c696c9370a1e5136816ca557c17f82a6fa83f1", - "reference": "60c696c9370a1e5136816ca557c17f82a6fa83f1", - "shasum": "" - }, - "require": { - "ext-json": "*", - "justinrainbow/json-schema": ">=1.0,<2.0-dev", - "php": ">=5.3.3", - "seld/jsonlint": ">=1.0,<2.0-dev" - }, - "require-dev": { - "herrera-io/phpunit-test-case": "1.*", - "mikey179/vfsstream": "1.1.0", - "phpunit/phpunit": "3.7.*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "files": [ - "src/lib/json_version.php" - ], - "psr-0": { - "Herrera\\Json": "src/lib" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, { - "name": "Kevin Herrera", - "email": "kevin@herrera.io", - "homepage": "http://kevin.herrera.io" + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "A library for simplifying JSON linting and validation.", - "homepage": "http://herrera-io.github.com/php-json", - "keywords": [ - "json", - "lint", - "schema", - "validate" - ], - "time": "2013-10-30 16:51:34" - }, - { - "name": "herrera-io/phar-update", - "version": "2.0.0", - "source": { - "type": "git", - "url": "https://github.com/kherge-abandoned/php-phar-update.git", - "reference": "15643c90d3d43620a4f45c910e6afb7a0ad4b488" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/kherge-abandoned/php-phar-update/zipball/15643c90d3d43620a4f45c910e6afb7a0ad4b488", - "reference": "15643c90d3d43620a4f45c910e6afb7a0ad4b488", - "shasum": "" - }, - "require": { - "herrera-io/json": "1.*", - "herrera-io/version": "1.*", - "php": ">=5.3.3" - }, - "require-dev": { - "herrera-io/phpunit-test-case": "1.*", - "mikey179/vfsstream": "1.1.0", - "phpunit/phpunit": "3.7.*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "files": [ - "src/lib/constants.php" - ], - "psr-0": { - "Herrera\\Phar\\Update": "src/lib" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Kevin Herrera", - "email": "kevin@herrera.io", - "homepage": "http://kevin.herrera.io" - } - ], - "description": "A library for self-updating Phars.", - "homepage": "http://herrera-io.github.com/php-phar-update", - "keywords": [ - "phar", - "update" - ], - "time": "2013-11-09 17:13:13" - }, - { - "name": "herrera-io/version", - "version": "1.1.1", - "source": { - "type": "git", - "url": "https://github.com/kherge-abandoned/php-version.git", - "reference": "d39d9642b92a04d8b8a28b871b797a35a2545e85" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/kherge-abandoned/php-version/zipball/d39d9642b92a04d8b8a28b871b797a35a2545e85", - "reference": "d39d9642b92a04d8b8a28b871b797a35a2545e85", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "herrera-io/phpunit-test-case": "1.*", - "phpunit/phpunit": "3.7.*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1.x-dev" - } - }, - "autoload": { - "psr-0": { - "Herrera\\Version": "src/lib" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Kevin Herrera", - "email": "kevin@herrera.io", - "homepage": "http://kevin.herrera.io" - } - ], - "description": "A library for creating, editing, and comparing semantic versioning numbers.", - "homepage": "http://github.com/herrera-io/php-version", - "keywords": [ - "semantic", - "version" - ], - "time": "2014-05-27 05:29:25" - }, - { - "name": "justinrainbow/json-schema", - "version": "1.5.0", - "source": { - "type": "git", - "url": "https://github.com/justinrainbow/json-schema.git", - "reference": "a4bee9f4b344b66e0a0d96c7afae1e92edf385fe" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/justinrainbow/json-schema/zipball/a4bee9f4b344b66e0a0d96c7afae1e92edf385fe", - "reference": "a4bee9f4b344b66e0a0d96c7afae1e92edf385fe", - "shasum": "" - }, - "require": { - "php": ">=5.3.2" - }, - "require-dev": { - "json-schema/json-schema-test-suite": "1.1.0", - "phpdocumentor/phpdocumentor": "~2", - "phpunit/phpunit": "~3.7" - }, - "bin": [ - "bin/validate-json" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4.x-dev" - } - }, - "autoload": { - "psr-4": { - "JsonSchema\\": "src/JsonSchema/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Bruno Prieto Reis", - "email": "bruno.p.reis@gmail.com" - }, - { - "name": "Justin Rainbow", - "email": "justin.rainbow@gmail.com" - }, - { - "name": "Igor Wiedler", - "email": "igor@wiedler.ch" - }, - { - "name": "Robert Schönthal", - "email": "seroscho@googlemail.com" - } - ], - "description": "A library to validate a json schema.", - "homepage": "https://github.com/justinrainbow/json-schema", - "keywords": [ - "json", - "schema" - ], - "time": "2015-09-08 22:28:04" - }, - { - "name": "kherge/amend", - "version": "3.0.4", - "source": { - "type": "git", - "url": "https://github.com/box-project/amend.git", - "reference": "16cc7665e847d09cc9ccadec546a2de05c40e8f4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/box-project/amend/zipball/16cc7665e847d09cc9ccadec546a2de05c40e8f4", - "reference": "16cc7665e847d09cc9ccadec546a2de05c40e8f4", - "shasum": "" - }, - "require": { - "herrera-io/phar-update": "~2.0", - "php": ">=5.3.3", - "symfony/console": "~2.1" - }, - "require-dev": { - "herrera-io/box": "~1.0", - "herrera-io/phpunit-test-case": "1.*", - "phpunit/phpunit": "3.7.*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "psr-0": { - "KevinGH\\Amend": "src/lib" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Kevin Herrera", - "email": "kevin@herrera.io", - "homepage": "http://kevin.herrera.io" - } - ], - "description": "Integrates Phar Update to Symfony Console.", - "homepage": "http://github.com/box-project/amend", - "keywords": [ - "console", - "phar", - "update" - ], - "time": "2014-11-05 15:29:01" - }, - { - "name": "kherge/box", - "version": "2.5.3", - "source": { - "type": "git", - "url": "https://github.com/box-project/box2.git", - "reference": "27685671901b76bfa871b698487fc8c217df34dc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/box-project/box2/zipball/27685671901b76bfa871b698487fc8c217df34dc", - "reference": "27685671901b76bfa871b698487fc8c217df34dc", - "shasum": "" - }, - "require": { - "herrera-io/annotations": "~1.0", - "herrera-io/box": "~1.6", - "herrera-io/json": "~1.0", - "justinrainbow/json-schema": "~1.3", - "kherge/amend": "~3.0", - "phine/path": "~1.0", - "php": ">=5.3.3", - "phpseclib/phpseclib": "~0.3", - "symfony/console": "~2.1", - "symfony/finder": "~2.1", - "symfony/process": "~2.1" - }, - "require-dev": { - "herrera-io/phpunit-test-case": "1.*", - "mikey179/vfsstream": "1.1.0", - "phpunit/phpunit": "3.7.*" - }, - "suggest": { - "ext-openssl": "To accelerate private key generation." - }, - "bin": [ - "bin/box" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.x-dev" - } - }, - "autoload": { - "psr-0": { - "KevinGH\\Box": "src/lib" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Kevin Herrera", - "email": "kevin@herrera.io", - "homepage": "http://kevin.herrera.io" - } - ], - "description": "A tool to simplify building PHARs.", - "homepage": "http://box-project.github.io/box2/", - "keywords": [ - "phar" - ], - "time": "2015-08-31 18:10:42" - }, - { - "name": "phine/exception", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/kherge-abandoned/lib-exception.git", - "reference": "150c6b6090b2ebc53c60e87cb20c7f1287b7b68a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/kherge-abandoned/lib-exception/zipball/150c6b6090b2ebc53c60e87cb20c7f1287b7b68a", - "reference": "150c6b6090b2ebc53c60e87cb20c7f1287b7b68a", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "league/phpunit-coverage-listener": "~1.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "psr-0": { - "Phine\\Exception": "src/lib" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Kevin Herrera", - "email": "kevin@herrera.io", - "homepage": "http://kevin.herrera.io" - } - ], - "description": "A PHP library for improving the use of exceptions.", - "homepage": "https://github.com/phine/lib-exception", - "keywords": [ - "exception" - ], - "time": "2013-08-27 17:43:25" - }, - { - "name": "phine/path", - "version": "1.1.0", - "source": { - "type": "git", - "url": "https://github.com/box-project/box2-path.git", - "reference": "cbe1a5eb6cf22958394db2469af9b773508abddd" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/box-project/box2-path/zipball/cbe1a5eb6cf22958394db2469af9b773508abddd", - "reference": "cbe1a5eb6cf22958394db2469af9b773508abddd", - "shasum": "" - }, - "require": { - "phine/exception": "~1.0", - "php": ">=5.3.3" - }, - "require-dev": { - "league/phpunit-coverage-listener": "~1.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "psr-0": { - "Phine\\Path": "src/lib" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Kevin Herrera", - "email": "kevin@herrera.io", - "homepage": "http://kevin.herrera.io" - } - ], - "description": "A PHP library for improving the use of file system paths.", - "homepage": "https://github.com/phine/lib-path", - "keywords": [ - "file", - "path", - "system" - ], - "time": "2013-10-15 22:58:04" - }, - { - "name": "phpseclib/phpseclib", - "version": "0.3.10", - "source": { - "type": "git", - "url": "https://github.com/phpseclib/phpseclib.git", - "reference": "d15bba1edcc7c89e09cc74c5d961317a8b947bf4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/d15bba1edcc7c89e09cc74c5d961317a8b947bf4", - "reference": "d15bba1edcc7c89e09cc74c5d961317a8b947bf4", - "shasum": "" - }, - "require": { - "php": ">=5.0.0" - }, - "require-dev": { - "phing/phing": "~2.7", - "phpunit/phpunit": "~4.0", - "sami/sami": "~2.0", - "squizlabs/php_codesniffer": "~1.5" - }, - "suggest": { - "ext-gmp": "Install the GMP (GNU Multiple Precision) extension in order to speed up arbitrary precision integer arithmetic operations.", - "ext-mcrypt": "Install the Mcrypt extension in order to speed up a wide variety of cryptographic operations.", - "pear-pear/PHP_Compat": "Install PHP_Compat to get phpseclib working on PHP < 4.3.3." - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "0.3-dev" - } - }, - "autoload": { - "psr-0": { - "Crypt": "phpseclib/", - "File": "phpseclib/", - "Math": "phpseclib/", - "Net": "phpseclib/", - "System": "phpseclib/" - }, - "files": [ - "phpseclib/Crypt/Random.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "include-path": [ - "phpseclib/" - ], - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jim Wigginton", - "email": "terrafrost@php.net", - "role": "Lead Developer" - }, - { - "name": "Patrick Monnerat", - "email": "pm@datasphere.ch", - "role": "Developer" - }, - { - "name": "Andreas Fischer", - "email": "bantu@phpbb.com", - "role": "Developer" - }, - { - "name": "Hans-Jürgen Petrich", - "email": "petrich@tronic-media.com", - "role": "Developer" - } - ], - "description": "PHP Secure Communications Library - Pure-PHP implementations of RSA, AES, SSH2, SFTP, X.509 etc.", - "homepage": "http://phpseclib.sourceforge.net", - "keywords": [ - "BigInteger", - "aes", - "asn.1", - "asn1", - "blowfish", - "crypto", - "cryptography", - "encryption", - "rsa", - "security", - "sftp", - "signature", - "signing", - "ssh", - "twofish", - "x.509", - "x509" - ], - "time": "2015-01-28 21:50:33" - }, - { - "name": "seld/jsonlint", - "version": "1.3.1", - "source": { - "type": "git", - "url": "https://github.com/Seldaek/jsonlint.git", - "reference": "863ae85c6d3ef60ca49cb12bd051c4a0648c40c4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Seldaek/jsonlint/zipball/863ae85c6d3ef60ca49cb12bd051c4a0648c40c4", - "reference": "863ae85c6d3ef60ca49cb12bd051c4a0648c40c4", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "bin": [ - "bin/jsonlint" - ], - "type": "library", - "autoload": { - "psr-4": { - "Seld\\JsonLint\\": "src/Seld/JsonLint/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" - } - ], - "description": "JSON Linter", - "keywords": [ - "json", - "linter", - "parser", - "validator" - ], - "time": "2015-01-04 21:18:15" - }, - { - "name": "symfony/finder", - "version": "v2.7.4", - "source": { - "type": "git", - "url": "https://github.com/symfony/Finder.git", - "reference": "fff4b0c362640a0ab7355e2647b3d461608e9065" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/Finder/zipball/fff4b0c362640a0ab7355e2647b3d461608e9065", - "reference": "fff4b0c362640a0ab7355e2647b3d461608e9065", - "shasum": "" - }, - "require": { - "php": ">=5.3.9" - }, - "require-dev": { - "symfony/phpunit-bridge": "~2.7" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.7-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Finder\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Finder Component", + "description": "Symfony Process Component", "homepage": "https://symfony.com", - "time": "2015-08-26 17:56:37" - }, - { - "name": "tedivm/jshrink", - "version": "v1.1.0", - "source": { - "type": "git", - "url": "https://github.com/tedious/JShrink.git", - "reference": "688527a2e854d7935f24f24c7d5eb1b604742bf9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/tedious/JShrink/zipball/688527a2e854d7935f24f24c7d5eb1b604742bf9", - "reference": "688527a2e854d7935f24f24c7d5eb1b604742bf9", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "require-dev": { - "fabpot/php-cs-fixer": "0.4.0", - "phpunit/phpunit": "4.0.*", - "satooshi/php-coveralls": "dev-master" - }, - "type": "library", - "autoload": { - "psr-0": { - "JShrink": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Robert Hafner", - "email": "tedivm@tedivm.com" - } - ], - "description": "Javascript Minifier built in PHP", - "homepage": "http://github.com/tedious/JShrink", - "keywords": [ - "javascript", - "minifier" - ], - "time": "2015-07-04 07:35:09" + "time": "2015-08-27 06:45:45" } ], + "packages-dev": [], "aliases": [], "minimum-stability": "stable", "stability-flags": [], diff --git a/src/Symfony/Installer/DownloadCommand.php b/src/Symfony/Installer/DownloadCommand.php index 119d465..add3bd3 100644 --- a/src/Symfony/Installer/DownloadCommand.php +++ b/src/Symfony/Installer/DownloadCommand.php @@ -18,8 +18,7 @@ use Distill\Strategy\MinimumSize; use GuzzleHttp\Client; use GuzzleHttp\Exception\ClientException; -use GuzzleHttp\Message\Response; -use GuzzleHttp\Subscriber\Progress\Progress; +use GuzzleHttp\Event\ProgressEvent; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Helper\ProgressBar; use Symfony\Component\Console\Input\InputInterface; @@ -124,13 +123,14 @@ protected function download() }; $client = $this->getGuzzleClient(); - $client->getEmitter()->attach(new Progress(null, $downloadCallback)); // store the file in a temporary hidden directory with a random name $this->downloadedFilePath = rtrim(getcwd(), DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR.'.'.uniqid(time()).DIRECTORY_SEPARATOR.'symfony.'.pathinfo($symfonyArchiveFile, PATHINFO_EXTENSION); try { - $response = $client->get($symfonyArchiveFile); + $request = $client->createRequest('GET', $symfonyArchiveFile); + $request->getEmitter()->on('progress', $downloadCallback); + $response = $client->send($request); } catch (ClientException $e) { if ('new' === $this->getName() && ($e->getCode() === 403 || $e->getCode() === 404)) { throw new \RuntimeException(sprintf(