{"action":"created","issue":{"url":"https://api.github.com/repos/composer/composer/issues/5814","repository_url":"https://api.github.com/repos/composer/composer","labels_url":"https://api.github.com/repos/composer/composer/issues/5814/labels{/name}","comments_url":"https://api.github.com/repos/composer/composer/issues/5814/comments","events_url":"https://api.github.com/repos/composer/composer/issues/5814/events","html_url":"https://github.com/composer/composer/issues/5814","id":185163914,"number":5814,"title":"zlib_decode(): data error","user":{"login":"radutopala","id":647137,"avatar_url":"https://avatars.githubusercontent.com/u/647137?v=3","gravatar_id":"","url":"https://api.github.com/users/radutopala","html_url":"https://github.com/radutopala","followers_url":"https://api.github.com/users/radutopala/followers","following_url":"https://api.github.com/users/radutopala/following{/other_user}","gists_url":"https://api.github.com/users/radutopala/gists{/gist_id}","starred_url":"https://api.github.com/users/radutopala/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/radutopala/subscriptions","organizations_url":"https://api.github.com/users/radutopala/orgs","repos_url":"https://api.github.com/users/radutopala/repos","events_url":"https://api.github.com/users/radutopala/events{/privacy}","received_events_url":"https://api.github.com/users/radutopala/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":40,"created_at":"2016-10-25T16:12:09Z","updated_at":"2016-11-07T10:00:46Z","closed_at":"2016-10-26T08:12:33Z","body":"My `composer.json`:\n\n``` json\n{\n    \"name\": \"test/test\",\n    \"license\": \"proprietary\",\n    \"type\": \"project\",\n    \"autoload\": {\n        \"psr-4\": {\n            \"\": \"src/\"\n        },\n        \"classmap\": [\n            \"app/AppKernel.php\",\n            \"app/AppCache.php\"\n        ]\n    },\n    \"autoload-dev\": {\n        \"psr-4\": {\n            \"Tests\\\\\": \"tests/\"\n        }\n    },\n    \"require\": {\n        \"php\": \">=7.0.11\",\n        \"symfony/symfony\": \"3.1.*\",\n        \"doctrine/orm\": \"^2.5\",\n        \"doctrine/doctrine-bundle\": \"^1.6\",\n        \"doctrine/doctrine-cache-bundle\": \"^1.2\",\n        \"doctrine/doctrine-migrations-bundle\": \"^1.1\",\n        \"symfony/swiftmailer-bundle\": \"^2.3\",\n        \"symfony/monolog-bundle\": \"^2.8\",\n        \"symfony/assetic-bundle\": \"^2.8\",\n        \"symfony/polyfill-apcu\": \"^1.0\",\n        \"sensio/distribution-bundle\": \"^5.0\",\n        \"sensio/framework-extra-bundle\": \"^3.0.2\",\n        \"incenteev/composer-parameter-handler\": \"^2.0\",\n        \"snc/redis-bundle\": \"2.x-dev\",\n        \"predis/predis\": \"^1.0\",\n        \"lexik/jwt-authentication-bundle\": \"^1.5\",\n        \"tss/automailer-bundle\": \"dev-master\",\n        \"knplabs/knp-paginator-bundle\": \"^2.5\",\n        \"fabpot/goutte\": \"^3.1\",\n        \"whiteoctober/breadcrumbs-bundle\": \"^1.2\",\n        \"spraed/pdf-generator-bundle\": \"^1.3\",\n        \"vich/uploader-bundle\": \"1.2.0\",\n        \"friendsofsymfony/jsrouting-bundle\": \"^1.6\",\n        \"gregwar/captcha-bundle\": \"^2.0\",\n        \"liip/imagine-bundle\": \"^1.6\",\n        \"knplabs/knp-menu-bundle\": \"^2.0\",\n        \"fabpot/php-cs-fixer\": \"^1.12\",\n        \"symfony/serializer\": \"^3.1\",\n        \"jms/serializer\": \"^1.3\",\n        \"jms/serializer-bundle\": \"^1.1\"\n\n    },\n    \"require-dev\": {\n        \"sensio/generator-bundle\": \"^3.0\",\n        \"symfony/phpunit-bridge\": \"^3.0\"\n    },\n    \"scripts\": {\n        \"post-install-cmd\": [\n            \"Incenteev\\\\ParameterHandler\\\\ScriptHandler::buildParameters\",\n            \"Sensio\\\\Bundle\\\\DistributionBundle\\\\Composer\\\\ScriptHandler::buildBootstrap\",\n            \"Sensio\\\\Bundle\\\\DistributionBundle\\\\Composer\\\\ScriptHandler::clearCache\",\n            \"Sensio\\\\Bundle\\\\DistributionBundle\\\\Composer\\\\ScriptHandler::installAssets\",\n            \"Sensio\\\\Bundle\\\\DistributionBundle\\\\Composer\\\\ScriptHandler::installRequirementsFile\",\n            \"Sensio\\\\Bundle\\\\DistributionBundle\\\\Composer\\\\ScriptHandler::prepareDeploymentTarget\"\n        ],\n        \"post-update-cmd\": [\n            \"Incenteev\\\\ParameterHandler\\\\ScriptHandler::buildParameters\",\n            \"Sensio\\\\Bundle\\\\DistributionBundle\\\\Composer\\\\ScriptHandler::buildBootstrap\",\n            \"Sensio\\\\Bundle\\\\DistributionBundle\\\\Composer\\\\ScriptHandler::clearCache\",\n            \"Sensio\\\\Bundle\\\\DistributionBundle\\\\Composer\\\\ScriptHandler::installAssets\",\n            \"Sensio\\\\Bundle\\\\DistributionBundle\\\\Composer\\\\ScriptHandler::installRequirementsFile\",\n            \"Sensio\\\\Bundle\\\\DistributionBundle\\\\Composer\\\\ScriptHandler::prepareDeploymentTarget\"\n        ]\n    },\n    \"extra\": {\n        \"symfony-app-dir\": \"app\",\n        \"symfony-bin-dir\": \"bin\",\n        \"symfony-var-dir\": \"var\",\n        \"symfony-web-dir\": \"web\",\n        \"symfony-tests-dir\": \"tests\",\n        \"symfony-assets-install\": \"relative\",\n        \"incenteev-parameters\": {\n            \"file\": \"app/config/parameters.yml\"\n        }\n    }\n}\n```\n\nOutput of `composer diagnose`:\n\n```\nChecking composer.json: WARNING\nDefining autoload.psr-4 with an empty namespace prefix is a bad idea for performance\nrequire.snc/redis-bundle : exact version constraints (2.x-dev) should be avoided if the package follows semantic versioning\nrequire.tss/automailer-bundle : unbound version constraints (dev-master) should be avoided\nrequire.vich/uploader-bundle : exact version constraints (1.2.0) should be avoided if the package follows semantic versioning\nChecking platform settings: OK\nChecking git settings: OK\nChecking http connectivity to packagist: OK\nChecking https connectivity to packagist: OK\nChecking github.com rate limit: OK\nChecking disk free space: OK\nChecking pubkeys:\nTags Public Key Fingerprint: 57815BA2 7E54DC31 7ECC7CC5 573090D0  87719BA6 8F3BB723 4E5D42D0 84A14642\nDev Public Key Fingerprint: 4AC45767 E5EC2265 2F0C1167 CBBB8A2B  0C708369 153E328C AD90147D AFE50952\nOK\nChecking composer version: OK\n```\n\nWhen I run this command:\n\n```\ncomposer update --lock -vvv\n```\n\nI get the following output:\n\n```\nReading ./composer.json\nLoading config file ./composer.json\nChecked CA file /etc/ssl/certs/ca-certificates.crt: valid\nExecuting command (/var/www): git branch --no-color --no-abbrev -v\nFailed to initialize global composer: Composer could not find the config file: /home/vagrant/.config/composer/composer.json\nTo initialize a project, please create a composer.json file as described in the https://getcomposer.org/ \"Getting Started\" section\nReading /var/www/vendor/composer/installed.json\nLoading plugin PackageVersions\\Installer\nRunning 1.2.1 (2016-09-12 11:27:19) with PHP 7.0.11-1+deb.sury.org~trusty+1 on Linux / 3.13.0-86-generic\nReading ./composer.lock\nLoading composer repositories with package information\nDownloading https://packagist.org/packages.json\nWriting /home/vagrant/.cache/composer/repo/https---packagist.org/packages.json into cache\nUpdating dependencies (including require-dev)\nReading /home/vagrant/.cache/composer/repo/https---packagist.org/p-provider-2013.json from cache\nReading /home/vagrant/.cache/composer/repo/https---packagist.org/p-provider-2014.json from cache\nDownloading http://packagist.org/p/provider-2015%245cb89636f37ca04dbb7ceb6ba2f12ccbc6cd3a53b2ae3528c090a56f90975e18.json\nWriting /home/vagrant/.cache/composer/repo/https---packagist.org/p-provider-2015.json into cache\nReading /home/vagrant/.cache/composer/repo/https---packagist.org/p-provider-2016-01.json from cache\nReading /home/vagrant/.cache/composer/repo/https---packagist.org/p-provider-2016-04.json from cache\nDownloading http://packagist.org/p/provider-2016-07%247062176fff1b75c50a0a1383e29cc73864f4c0ce30d243c1234e0833be1193c0.json\nWriting /home/vagrant/.cache/composer/repo/https---packagist.org/p-provider-2016-07.json into cache\nDownloading http://packagist.org/p/provider-2016-10%244d79c57bd512ea7c9843446e53ae95329eef94e3be3511f5f701a5f400739bd0.json\nWriting /home/vagrant/.cache/composer/repo/https---packagist.org/p-provider-2016-10.json into cache\nReading /home/vagrant/.cache/composer/repo/https---packagist.org/p-provider-archived.json from cache\nDownloading http://packagist.org/p/provider-latest%24dbfb3faaaffdfaec3494564d129e9a9310fc4a753efad4fcc8b4f91cf787398a.json\nWriting /home/vagrant/.cache/composer/repo/https---packagist.org/p-provider-latest.json into cache\nReading /home/vagrant/.cache/composer/repo/https---packagist.org/provider-doctrine$lexer.json from cache\nReading /home/vagrant/.cache/composer/repo/https---packagist.org/provider-doctrine$annotations.json from cache\nReading /home/vagrant/.cache/composer/repo/https---packagist.org/provider-symfony$polyfill-util.json from cache\nReading /home/vagrant/.cache/composer/repo/https---packagist.org/provider-paragonie$random-compat.json from cache\nReading /home/vagrant/.cache/composer/repo/https---packagist.org/provider-symfony$polyfill-php70.json from cache\nReading /home/vagrant/.cache/composer/repo/https---packagist.org/provider-symfony$polyfill-php56.json from cache\nReading /home/vagrant/.cache/composer/repo/https---packagist.org/provider-symfony$polyfill-mbstring.json from cache\nReading /home/vagrant/.cache/composer/repo/https---packagist.org/provider-symfony$intl.json from cache\nReading /home/vagrant/.cache/composer/repo/https---packagist.org/provider-symfony$polyfill-intl-icu.json from cache\nReading /home/vagrant/.cache/composer/repo/https---packagist.org/provider-symfony$icu.json from cache\nReading /home/vagrant/.cache/composer/repo/https---packagist.org/provider-symfony$polyfill-php54.json from cache\nReading /home/vagrant/.cache/composer/repo/https---packagist.org/provider-doctrine$inflector.json from cache\nReading /home/vagrant/.cache/composer/repo/https---packagist.org/provider-doctrine$collections.json from cache\nReading /home/vagrant/.cache/composer/repo/https---packagist.org/provider-doctrine$cache.json from cache\nReading /home/vagrant/.cache/composer/repo/https---packagist.org/provider-doctrine$common.json from cache\nReading /home/vagrant/.cache/composer/repo/https---packagist.org/provider-jdorn$sql-formatter.json from cache\nReading /home/vagrant/.cache/composer/repo/https---packagist.org/provider-symfony$doctrine-bridge.json from cache\nReading /home/vagrant/.cache/composer/repo/https---packagist.org/provider-doctrine$doctrine-cache-bundle.json from cache\nReading /home/vagrant/.cache/composer/repo/https---packagist.org/provider-doctrine$dbal.json from cache\nReading /home/vagrant/.cache/composer/repo/https---packagist.org/provider-symfony$console.json from cache\nReading /home/vagrant/.cache/composer/repo/https---packagist.org/provider-symfony$framework-bundle.json from cache\nReading /home/vagrant/.cache/composer/repo/https---packagist.org/provider-doctrine$doctrine-bundle.json from cache\nReading /home/vagrant/.cache/composer/repo/https---packagist.org/provider-symfony$security-acl.json from cache\nReading /home/vagrant/.cache/composer/repo/https---packagist.org/provider-symfony$debug.json from cache\nReading /home/vagrant/.cache/composer/repo/https---packagist.org/provider-symfony$config.json from cache\nReading /home/vagrant/.cache/composer/repo/https---packagist.org/provider-symfony$dependency-injection.json from cache\nReading /home/vagrant/.cache/composer/repo/https---packagist.org/provider-symfony$event-dispatcher.json from cache\nReading /home/vagrant/.cache/composer/repo/https---packagist.org/provider-symfony$filesystem.json from cache\nReading /home/vagrant/.cache/composer/repo/https---packagist.org/provider-symfony$http-kernel.json from cache\nReading /home/vagrant/.cache/composer/repo/https---packagist.org/provider-symfony$routing.json from cache\nReading /home/vagrant/.cache/composer/repo/https---packagist.org/provider-symfony$stopwatch.json from cache\nReading /home/vagrant/.cache/composer/repo/https---packagist.org/provider-symfony$templating.json from cache\nReading /home/vagrant/.cache/composer/repo/https---packagist.org/provider-symfony$translation.json from cache\nReading /home/vagrant/.cache/composer/repo/https---packagist.org/provider-symfony$http-foundation.json from cache\nReading /home/vagrant/.cache/composer/repo/https---packagist.org/provider-symfony$finder.json from cache\nReading /home/vagrant/.cache/composer/repo/https---packagist.org/provider-symfony$security-core.json from cache\nReading /home/vagrant/.cache/composer/repo/https---packagist.org/provider-symfony$security-csrf.json from cache\nReading /home/vagrant/.cache/composer/repo/https---packagist.org/provider-symfony$asset.json from cache\nReading /home/vagrant/.cache/composer/repo/https---packagist.org/provider-symfony$class-loader.json from cache\nDownloading http://packagist.org/p/symfony/cache%24a1f76f69d06d444880b68ccf242fb1bd45fc3e1ab332313999d2669d3a5e2672.json\nFailed to decode response: zlib_decode(): data error\nRetrying with degraded mode, check https://getcomposer.org/doc/articles/troubleshooting.md#degraded-mode for more info\nDownloading http://packagist.org/p/symfony/cache%24a1f76f69d06d444880b68ccf242fb1bd45fc3e1ab332313999d2669d3a5e2672.json\nDownloading http://packagist.org/p/symfony/cache%24a1f76f69d06d444880b68ccf242fb1bd45fc3e1ab332313999d2669d3a5e2672.json\nWriting /home/vagrant/.cache/composer/repo/https---packagist.org/provider-symfony$cache.json into cache\nDownloading http://packagist.org/p/psr/log%244f0edf1b639fc9b0914c0c8d13bef27cdaa71100c3719780a0459b9dd799753d.json\nWriting /home/vagrant/.cache/composer/repo/https---packagist.org/provider-psr$log.json into cache\nDownloading http://packagist.org/p/symfony/polyfill-php55%242c54472a8856ee39440a29ee7182c3205d88d60817040f9dea8604d9eb7f2a41.json\nWriting /home/vagrant/.cache/composer/repo/https---packagist.org/provider-symfony$polyfill-php55.json into cache\nDownloading http://packagist.org/p/symfony/polyfill-apcu%24a910411a4953aeae3659a62e7334cc11b50e9066d4dc6a6b63ff4a665879ebb1.json\nWriting /home/vagrant/.cache/composer/repo/https---packagist.org/provider-symfony$polyfill-apcu.json into cache\nDownloading http://packagist.org/p/psr/cache%24ed2696a6c78734dcaf8b8eb5ba4b7ebc9d2822015a1211521e390c514093e303.json\nDownloading http://packagist.org/p/psr/cache%24ed2696a6c78734dcaf8b8eb5ba4b7ebc9d2822015a1211521e390c514093e303.json\nDownloading http://packagist.org/p/psr/cache%24ed2696a6c78734dcaf8b8eb5ba4b7ebc9d2822015a1211521e390c514093e303.json\n\n\n  [ErrorException]\n  zlib_decode(): data error\n\n\nException trace:\n () at phar:///bin/composer/src/Composer/Util/RemoteFilesystem.php:388\n Composer\\Util\\ErrorHandler::handle() at n/a:n/a\n zlib_decode() at phar:///bin/composer/src/Composer/Util/RemoteFilesystem.php:388\n Composer\\Util\\RemoteFilesystem->get() at phar:///bin/composer/src/Composer/Util/RemoteFilesystem.php:101\n Composer\\Util\\RemoteFilesystem->getContents() at phar:///bin/composer/src/Composer/Repository/ComposerRepository.php:646\n Composer\\Repository\\ComposerRepository->fetchFile() at phar:///bin/composer/src/Composer/Repository/ComposerRepository.php:332\n Composer\\Repository\\ComposerRepository->whatProvides() at phar:///bin/composer/src/Composer/DependencyResolver/Pool.php:204\n Composer\\DependencyResolver\\Pool->computeWhatProvides() at phar:///bin/composer/src/Composer/DependencyResolver/Pool.php:193\n Composer\\DependencyResolver\\Pool->whatProvides() at phar:///bin/composer/src/Composer/DependencyResolver/RuleSetGenerator.php:161\n Composer\\DependencyResolver\\RuleSetGenerator->whitelistFromPackage() at phar:///bin/composer/src/Composer/DependencyResolver/RuleSetGenerator.php:322\n Composer\\DependencyResolver\\RuleSetGenerator->getRulesFor() at phar:///bin/composer/src/Composer/DependencyResolver/Solver.php:214\n Composer\\DependencyResolver\\Solver->solve() at phar:///bin/composer/src/Composer/Installer.php:461\n Composer\\Installer->doInstall() at phar:///bin/composer/src/Composer/Installer.php:216\n Composer\\Installer->run() at phar:///bin/composer/src/Composer/Command/UpdateCommand.php:174\n Composer\\Command\\UpdateCommand->execute() at phar:///bin/composer/vendor/symfony/console/Command/Command.php:259\n Symfony\\Component\\Console\\Command\\Command->run() at phar:///bin/composer/vendor/symfony/console/Application.php:847\n Symfony\\Component\\Console\\Application->doRunCommand() at phar:///bin/composer/vendor/symfony/console/Application.php:192\n Symfony\\Component\\Console\\Application->doRun() at phar:///bin/composer/src/Composer/Console/Application.php:231\n Composer\\Console\\Application->doRun() at phar:///bin/composer/vendor/symfony/console/Application.php:123\n Symfony\\Component\\Console\\Application->run() at phar:///bin/composer/src/Composer/Console/Application.php:104\n Composer\\Console\\Application->run() at phar:///bin/composer/bin/composer:43\n require() at /bin/composer:24\n```\n\nAnd I expected this to happen:\nExpected to update the `composer.lock`\n"},"comment":{"url":"https://api.github.com/repos/composer/composer/issues/comments/258793326","html_url":"https://github.com/composer/composer/issues/5814#issuecomment-258793326","issue_url":"https://api.github.com/repos/composer/composer/issues/5814","id":258793326,"user":{"login":"magnetik","id":345029,"avatar_url":"https://avatars.githubusercontent.com/u/345029?v=3","gravatar_id":"","url":"https://api.github.com/users/magnetik","html_url":"https://github.com/magnetik","followers_url":"https://api.github.com/users/magnetik/followers","following_url":"https://api.github.com/users/magnetik/following{/other_user}","gists_url":"https://api.github.com/users/magnetik/gists{/gist_id}","starred_url":"https://api.github.com/users/magnetik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/magnetik/subscriptions","organizations_url":"https://api.github.com/users/magnetik/orgs","repos_url":"https://api.github.com/users/magnetik/repos","events_url":"https://api.github.com/users/magnetik/events{/privacy}","received_events_url":"https://api.github.com/users/magnetik/received_events","type":"User","site_admin":false},"created_at":"2016-11-07T10:00:46Z","updated_at":"2016-11-07T10:00:46Z","body":"When doing the test with `application/json;text/plain` (and tweaking the decode with json_decode and test for null), i've the error with packagist server too.\r\n\r\nI received the following size, in that order:\r\n- 38KB\r\n- 33KB\r\n- 40KB (success)"}}
{"actor":{"display_login":"magnetik"}}