{"action":"created","issue":{"url":"https://api.github.com/repos/composer/composer/issues/5707","repository_url":"https://api.github.com/repos/composer/composer","labels_url":"https://api.github.com/repos/composer/composer/issues/5707/labels{/name}","comments_url":"https://api.github.com/repos/composer/composer/issues/5707/comments","events_url":"https://api.github.com/repos/composer/composer/issues/5707/events","html_url":"https://github.com/composer/composer/issues/5707","id":178830835,"number":5707,"title":"autoload_classmap.php file empty after running composer commands","user":{"login":"Rufflesaurus","id":6518995,"avatar_url":"https://avatars.githubusercontent.com/u/6518995?v=3","gravatar_id":"","url":"https://api.github.com/users/Rufflesaurus","html_url":"https://github.com/Rufflesaurus","followers_url":"https://api.github.com/users/Rufflesaurus/followers","following_url":"https://api.github.com/users/Rufflesaurus/following{/other_user}","gists_url":"https://api.github.com/users/Rufflesaurus/gists{/gist_id}","starred_url":"https://api.github.com/users/Rufflesaurus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rufflesaurus/subscriptions","organizations_url":"https://api.github.com/users/Rufflesaurus/orgs","repos_url":"https://api.github.com/users/Rufflesaurus/repos","events_url":"https://api.github.com/users/Rufflesaurus/events{/privacy}","received_events_url":"https://api.github.com/users/Rufflesaurus/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/composer/composer/labels/Support","name":"Support","color":"fef2c0"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":14,"created_at":"2016-09-23T09:40:12Z","updated_at":"2016-10-05T05:45:33Z","closed_at":"2016-09-29T06:50:37Z","body":"Hey, \r\n\r\nI work on a Laravel project and whenever I run `composer install / update, dump-autoload` or any `php artisan` commands, everything works fine for the first time, but when I run another composer / artisan command after that, I get the following error: \r\n\r\n```\r\nPHP Fatal error:  Uncaught TypeError: Argument 1 passed to Composer\\Autoload\\ClassLoader::addClassMap() must be of the type array, integer given, called in /var/www/html/vendor/composer/autoload_real.php on line 38 and defined in /var\r\n/www/html/vendor/composer/ClassLoader.php:91\r\nStack trace:\r\n#0 /var/www/html/vendor/composer/autoload_real.php(38): Composer\\Autoload\\ClassLoader->addClassMap(1)\r\n#1 /var/www/html/vendor/autoload.php(7): ComposerAutoloaderInitab0ba58f39538bb9f0cac5f548fa5488::getLoader()\r\n#2 /var/www/html/bootstrap/autoload.php(17): require('/var/www/html/v...')\r\n#3 /var/www/html/artisan(16): require('/var/www/html/b...')\r\n#4 {main}\r\n  thrown in /var/www/html/vendor/composer/ClassLoader.php on line 91\r\n\r\nFatal error: Uncaught TypeError: Argument 1 passed to Composer\\Autoload\\ClassLoader::addClassMap() must be of the type array, integer given, called in /var/www/html/vendor/composer/autoload_real.php on line 38 and defined in /var/www/\r\nhtml/vendor/composer/ClassLoader.php:91\r\nStack trace:\r\n#0 /var/www/html/vendor/composer/autoload_real.php(38): Composer\\Autoload\\ClassLoader->addClassMap(1)\r\n#1 /var/www/html/vendor/autoload.php(7): ComposerAutoloaderInitab0ba58f39538bb9f0cac5f548fa5488::getLoader()\r\n#2 /var/www/html/bootstrap/autoload.php(17): require('/var/www/html/v...')\r\n#3 /var/www/html/artisan(16): require('/var/www/html/b...')\r\n#4 {main}\r\n  thrown in /var/www/html/vendor/composer/ClassLoader.php on line 91\r\n\r\n```\r\n\r\nI noticed that the `autoload_classmap.php ` file is empty, so for a quick temporary fix, I deleted the composer folder and just run `composer install`. \r\n\r\nI've deleted the vendor folder completely and rerun `composer install` but that seems to work temporary. I still get the same error on the second composer / artisan command. \r\n\r\nI am using PHP 7.0.10 and Vagrant + Docker as my environment. I use a local `composer.phar` file inside the application container.\r\n\r\nWhen I run `composer self-update` I get:\r\n```\r\nYou are already using composer version 1.2.1 (stable channel).\r\n```\r\n\r\nThe weird part is that my colleague is using the same docker environment and he doesn't have this problem. Also, this happens to this project only.\r\n\r\nIf you need any more information, let me know. \r\n\r\nAny ideas what might be the problem?"},"comment":{"url":"https://api.github.com/repos/composer/composer/issues/comments/251587312","html_url":"https://github.com/composer/composer/issues/5707#issuecomment-251587312","issue_url":"https://api.github.com/repos/composer/composer/issues/5707","id":251587312,"user":{"login":"Seldaek","id":183678,"avatar_url":"https://avatars.githubusercontent.com/u/183678?v=3","gravatar_id":"","url":"https://api.github.com/users/Seldaek","html_url":"https://github.com/Seldaek","followers_url":"https://api.github.com/users/Seldaek/followers","following_url":"https://api.github.com/users/Seldaek/following{/other_user}","gists_url":"https://api.github.com/users/Seldaek/gists{/gist_id}","starred_url":"https://api.github.com/users/Seldaek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Seldaek/subscriptions","organizations_url":"https://api.github.com/users/Seldaek/orgs","repos_url":"https://api.github.com/users/Seldaek/repos","events_url":"https://api.github.com/users/Seldaek/events{/privacy}","received_events_url":"https://api.github.com/users/Seldaek/received_events","type":"User","site_admin":false},"created_at":"2016-10-05T05:45:33Z","updated_at":"2016-10-05T05:45:33Z","body":"1.8.9 has a bunch of requirements like it needs ext-xmlwriter and ext-simplexml, maybe you don't have those so it is downgrading to 1.8.0 which does not have the requirements. Try requiring 1.8.9 explicitly and it should tell you why it is not installable."}}
{"actor":{"display_login":"Seldaek"}}