{"action":"created","issue":{"url":"https://api.github.com/repos/composer/composer/issues/5556","repository_url":"https://api.github.com/repos/composer/composer","labels_url":"https://api.github.com/repos/composer/composer/issues/5556/labels{/name}","comments_url":"https://api.github.com/repos/composer/composer/issues/5556/comments","events_url":"https://api.github.com/repos/composer/composer/issues/5556/events","html_url":"https://github.com/composer/composer/issues/5556","id":167922163,"number":5556,"title":"New 1.2.0 Composer install bug: failed to open dir: Operation not permitted.","user":{"login":"Jakobud","id":87356,"avatar_url":"https://avatars.githubusercontent.com/u/87356?v=3","gravatar_id":"","url":"https://api.github.com/users/Jakobud","html_url":"https://github.com/Jakobud","followers_url":"https://api.github.com/users/Jakobud/followers","following_url":"https://api.github.com/users/Jakobud/following{/other_user}","gists_url":"https://api.github.com/users/Jakobud/gists{/gist_id}","starred_url":"https://api.github.com/users/Jakobud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Jakobud/subscriptions","organizations_url":"https://api.github.com/users/Jakobud/orgs","repos_url":"https://api.github.com/users/Jakobud/repos","events_url":"https://api.github.com/users/Jakobud/events{/privacy}","received_events_url":"https://api.github.com/users/Jakobud/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/composer/composer/labels/Support","name":"Support","color":"fef2c0"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-07-27T18:23:44Z","updated_at":"2016-07-27T19:41:46Z","closed_at":null,"body":"First some background: My project is a basic Laravel 5.2 installation. I have this setup on a Vagrant virtual machine (Ubuntu) using Composer `1.2-dev` and it installs fine. Today I spun up a new virtual machine (also Ubuntu) and the composer version installed is now `1.2.0`. When I `composer install` this same exact project on this machine, it fails to generate autoload files. As I said, it works perfectly fine with Composer `1.2-dev`.\r\n\r\nWith the following composer.json:\r\n\r\n```json\r\n{\r\n    \"name\": \"laravel/laravel\",\r\n    \"description\": \"The Laravel Framework.\",\r\n    \"keywords\": [\"framework\", \"laravel\"],\r\n    \"license\": \"MIT\",\r\n    \"type\": \"project\",\r\n    \"require\": {\r\n        \"php\": \">=5.5.9\",\r\n        \"laravel/framework\": \"5.2.*\"\r\n    },\r\n    \"require-dev\": {\r\n        \"fzaninotto/faker\": \"~1.4\",\r\n        \"mockery/mockery\": \"0.9.*\",\r\n        \"phpunit/phpunit\": \"~4.0\",\r\n        \"symfony/css-selector\": \"2.8.*|3.0.*\",\r\n        \"symfony/dom-crawler\": \"2.8.*|3.0.*\"\r\n    },\r\n    \"autoload\": {\r\n        \"classmap\": [\r\n            \"database\"\r\n        ],\r\n        \"psr-4\": {\r\n            \"App\\\\\": \"app/\"\r\n        }\r\n    },\r\n    \"autoload-dev\": {\r\n        \"classmap\": [\r\n            \"tests/TestCase.php\"\r\n        ]\r\n    },\r\n    \"scripts\": {\r\n        \"post-root-package-install\": [\r\n            \"php -r \\\"copy('.env.example', '.env');\\\"\"\r\n        ],\r\n        \"post-create-project-cmd\": [\r\n            \"php artisan key:generate\"\r\n        ],\r\n        \"post-install-cmd\": [\r\n            \"Illuminate\\\\Foundation\\\\ComposerScripts::postInstall\",\r\n            \"php artisan optimize\"\r\n        ],\r\n        \"post-update-cmd\": [\r\n            \"Illuminate\\\\Foundation\\\\ComposerScripts::postUpdate\",\r\n            \"php artisan optimize\"\r\n        ]\r\n    },\r\n    \"config\": {\r\n        \"preferred-install\": \"dist\"\r\n    }\r\n}\r\n```\r\n\r\nWhen I run this command:\r\n\r\n```\r\ncomposer command -vvv (please include -vvv!)\r\n```\r\n\r\nI get this output:\r\n\r\n```\r\n$ composer install -vvv\r\nReading ./composer.json\r\nLoading config file ./composer.json\r\nChecked CA file /etc/ssl/certs/ca-certificates.crt: valid\r\nExecuting command (/vagrant/vhosts/mywebsite): git branch --no-color --no-abbrev -v\r\nFailed to initialize global composer: Composer could not find the config file: /home/vagrant/.composer/composer.json\r\nTo initialize a project, please create a composer.json file as described in the https://getcomposer.org/ \"Getting Started\" section\r\nReading /vagrant/vhosts/mywebsite/vendor/composer/installed.json\r\nRunning 1.2.0 (2016-07-19 01:28:52) with PHP 5.6.24-1+deb.sury.org~trusty+1 on Linux / 3.19.0-25-generic\r\nYou are running composer with xdebug enabled. This has a major impact on runtime performance. See https://getcomposer.org/xdebug\r\nReading ./composer.lock\r\nLoading composer repositories with package information\r\nInstalling dependencies (including require-dev) from lock file\r\nReading ./composer.lock\r\nResolving dependencies through SAT\r\nDependency resolution completed in 0.012 seconds\r\nAnalyzed 172 packages to resolve dependencies\r\nAnalyzed 452 rules to resolve dependencies\r\nNothing to install or update\r\nGenerating autoload files\r\n\r\n                                                                                                                                      \r\n  [Symfony\\Component\\Finder\\Exception\\AccessDeniedException]                                                                          \r\n  RecursiveDirectoryIterator::__construct(/vagrant/vhosts/mywebsite/vendor/phpunit/php-code-coverage/src/CodeCoverage/R  \r\n  eport/HTML/Renderer/Template/fonts/.1a239c90-dae6-f0ef-0af3-093a963e8254.cls): failed to open dir: Operation not permitted          \r\n                                                                                                                                      \r\n\r\nException trace:\r\n () at phar:///usr/local/bin/composer/vendor/symfony/finder/Iterator/RecursiveDirectoryIterator.php:107\r\n Symfony\\Component\\Finder\\Iterator\\RecursiveDirectoryIterator->getChildren() at phar:///usr/local/bin/composer/vendor/symfony/finder/Iterator/ExcludeDirectoryFilterIterator.php:79\r\n Symfony\\Component\\Finder\\Iterator\\ExcludeDirectoryFilterIterator->getChildren() at n/a:n/a\r\n FilterIterator->next() at n/a:n/a\r\n FilterIterator->next() at n/a:n/a\r\n FilterIterator->next() at phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:80\r\n Composer\\Autoload\\ClassMapGenerator::createMap() at phar:///usr/local/bin/composer/src/Composer/Autoload/AutoloadGenerator.php:319\r\n Composer\\Autoload\\AutoloadGenerator->generateClassMap() at phar:///usr/local/bin/composer/src/Composer/Autoload/AutoloadGenerator.php:302\r\n Composer\\Autoload\\AutoloadGenerator->addClassMapCode() at phar:///usr/local/bin/composer/src/Composer/Autoload/AutoloadGenerator.php:249\r\n Composer\\Autoload\\AutoloadGenerator->dump() at phar:///usr/local/bin/composer/src/Composer/Installer.php:291\r\n Composer\\Installer->run() at phar:///usr/local/bin/composer/src/Composer/Command/InstallCommand.php:135\r\n Composer\\Command\\InstallCommand->execute() at phar:///usr/local/bin/composer/vendor/symfony/console/Command/Command.php:259\r\n Symfony\\Component\\Console\\Command\\Command->run() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:844\r\n Symfony\\Component\\Console\\Application->doRunCommand() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:192\r\n Symfony\\Component\\Console\\Application->doRun() at phar:///usr/local/bin/composer/src/Composer/Console/Application.php:231\r\n Composer\\Console\\Application->doRun() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:123\r\n Symfony\\Component\\Console\\Application->run() at phar:///usr/local/bin/composer/src/Composer/Console/Application.php:104\r\n Composer\\Console\\Application->run() at phar:///usr/local/bin/composer/bin/composer:43\r\n require() at /usr/local/bin/composer:24\r\n\r\n                                                                                                                                      \r\n  [UnexpectedValueException]                                                                                                          \r\n  RecursiveDirectoryIterator::__construct(/vagrant/vhosts/mywebsite/vendor/phpunit/php-code-coverage/src/CodeCoverage/R  \r\n  eport/HTML/Renderer/Template/fonts/.1a239c90-dae6-f0ef-0af3-093a963e8254.cls): failed to open dir: Operation not permitted          \r\n                                                                                                                                      \r\n\r\nException trace:\r\n () at phar:///usr/local/bin/composer/vendor/symfony/finder/Iterator/RecursiveDirectoryIterator.php:54\r\n RecursiveDirectoryIterator->__construct() at phar:///usr/local/bin/composer/vendor/symfony/finder/Iterator/RecursiveDirectoryIterator.php:54\r\n Symfony\\Component\\Finder\\Iterator\\RecursiveDirectoryIterator->__construct() at n/a:n/a\r\n RecursiveDirectoryIterator->getChildren() at phar:///usr/local/bin/composer/vendor/symfony/finder/Iterator/RecursiveDirectoryIterator.php:90\r\n Symfony\\Component\\Finder\\Iterator\\RecursiveDirectoryIterator->getChildren() at phar:///usr/local/bin/composer/vendor/symfony/finder/Iterator/ExcludeDirectoryFilterIterator.php:79\r\n Symfony\\Component\\Finder\\Iterator\\ExcludeDirectoryFilterIterator->getChildren() at n/a:n/a\r\n FilterIterator->next() at n/a:n/a\r\n FilterIterator->next() at n/a:n/a\r\n FilterIterator->next() at phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:80\r\n Composer\\Autoload\\ClassMapGenerator::createMap() at phar:///usr/local/bin/composer/src/Composer/Autoload/AutoloadGenerator.php:319\r\n Composer\\Autoload\\AutoloadGenerator->generateClassMap() at phar:///usr/local/bin/composer/src/Composer/Autoload/AutoloadGenerator.php:302\r\n Composer\\Autoload\\AutoloadGenerator->addClassMapCode() at phar:///usr/local/bin/composer/src/Composer/Autoload/AutoloadGenerator.php:249\r\n Composer\\Autoload\\AutoloadGenerator->dump() at phar:///usr/local/bin/composer/src/Composer/Installer.php:291\r\n Composer\\Installer->run() at phar:///usr/local/bin/composer/src/Composer/Command/InstallCommand.php:135\r\n Composer\\Command\\InstallCommand->execute() at phar:///usr/local/bin/composer/vendor/symfony/console/Command/Command.php:259\r\n Symfony\\Component\\Console\\Command\\Command->run() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:844\r\n Symfony\\Component\\Console\\Application->doRunCommand() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:192\r\n Symfony\\Component\\Console\\Application->doRun() at phar:///usr/local/bin/composer/src/Composer/Console/Application.php:231\r\n Composer\\Console\\Application->doRun() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:123\r\n Symfony\\Component\\Console\\Application->run() at phar:///usr/local/bin/composer/src/Composer/Console/Application.php:104\r\n Composer\\Console\\Application->run() at phar:///usr/local/bin/composer/bin/composer:43\r\n require() at /usr/local/bin/composer:24\r\n\r\ninstall [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [--no-suggest] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--ignore-platform-reqs] [--] [<packages>]...\r\n```\r\n\r\nAnd I expected this to happen:\r\nI expected the autoload files to be generated properly. This problem did not occur with Composer `1.2-dev`.\r\n\r\nAlso, I installed this latest version of composer in the typical recommended fashion per the documenation:\r\n```\r\nphp -r \"copy('https://getcomposer.org/installer', 'composer-setup.php');\"\r\nphp -r \"if (hash_file('SHA384', 'composer-setup.php') === 'e115a8dc7871f15d853148a7fbac7da27d6c0030b848d9b3dc09e2a0388afed865e6a3d6b3c0fad45c48e2b5fc1196ae') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;\"\r\nphp composer-setup.php\r\nphp -r \"unlink('composer-setup.php');\"\r\n```"},"comment":{"url":"https://api.github.com/repos/composer/composer/issues/comments/235697065","html_url":"https://github.com/composer/composer/issues/5556#issuecomment-235697065","issue_url":"https://api.github.com/repos/composer/composer/issues/5556","id":235697065,"user":{"login":"alcohol","id":21414,"avatar_url":"https://avatars.githubusercontent.com/u/21414?v=3","gravatar_id":"","url":"https://api.github.com/users/alcohol","html_url":"https://github.com/alcohol","followers_url":"https://api.github.com/users/alcohol/followers","following_url":"https://api.github.com/users/alcohol/following{/other_user}","gists_url":"https://api.github.com/users/alcohol/gists{/gist_id}","starred_url":"https://api.github.com/users/alcohol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alcohol/subscriptions","organizations_url":"https://api.github.com/users/alcohol/orgs","repos_url":"https://api.github.com/users/alcohol/repos","events_url":"https://api.github.com/users/alcohol/events{/privacy}","received_events_url":"https://api.github.com/users/alcohol/received_events","type":"User","site_admin":false},"created_at":"2016-07-27T19:41:46Z","updated_at":"2016-07-27T19:41:46Z","body":"I have no idea what .cls files are but I am pretty sure they do not belong to those packages o_O"}}
{"actor":{"display_login":"alcohol"}}