{"action":"closed","issue":{"url":"https://api.github.com/repos/composer/composer/issues/6457","repository_url":"https://api.github.com/repos/composer/composer","labels_url":"https://api.github.com/repos/composer/composer/issues/6457/labels{/name}","comments_url":"https://api.github.com/repos/composer/composer/issues/6457/comments","events_url":"https://api.github.com/repos/composer/composer/issues/6457/events","html_url":"https://github.com/composer/composer/issues/6457","id":232092365,"number":6457,"title":"composer dumpautoload --no-dev still includes dev dependencies","user":{"login":"Firehed","id":354842,"avatar_url":"https://avatars3.githubusercontent.com/u/354842?v=3","gravatar_id":"","url":"https://api.github.com/users/Firehed","html_url":"https://github.com/Firehed","followers_url":"https://api.github.com/users/Firehed/followers","following_url":"https://api.github.com/users/Firehed/following{/other_user}","gists_url":"https://api.github.com/users/Firehed/gists{/gist_id}","starred_url":"https://api.github.com/users/Firehed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Firehed/subscriptions","organizations_url":"https://api.github.com/users/Firehed/orgs","repos_url":"https://api.github.com/users/Firehed/repos","events_url":"https://api.github.com/users/Firehed/events{/privacy}","received_events_url":"https://api.github.com/users/Firehed/received_events","type":"User","site_admin":false},"labels":[{"id":66814887,"url":"https://api.github.com/repos/composer/composer/labels/Support","name":"Support","color":"fef2c0","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2017-05-29T20:24:22Z","updated_at":"2017-06-18T14:59:32Z","closed_at":"2017-06-18T14:59:32Z","body":"My `composer.json`:\r\n\r\n```json\r\n{\r\n    \"name\": \"firehed/certbot-cloudflare\",\r\n    \"description\": \"Certbot hooks for Cloudflare DNS verification\",\r\n    \"license\": \"MIT\",\r\n    \"autoload\": {\r\n        \"psr-4\": {\r\n            \"Firehed\\\\Cloudflare\\\\\": \"src/\"\r\n        }\r\n    },\r\n    \"require-dev\": {\r\n        \"kherge/box\": \"^2.7\"\r\n    }\r\n}\r\n```\r\n\r\nOutput of `composer diagnose`:\r\n\r\n```\r\nChecking composer.json: OK\r\nChecking platform settings: OK\r\nChecking git settings: OK\r\nChecking http connectivity to packagist: OK\r\nChecking https connectivity to packagist: OK\r\nChecking github.com rate limit: OK\r\nChecking disk free space: OK\r\nChecking pubkeys:\r\nTags Public Key Fingerprint: 57815BA2 7E54DC31 7ECC7CC5 573090D0  87719BA6 8F3BB723 4E5D42D0 84A14642\r\nDev Public Key Fingerprint: 4AC45767 E5EC2265 2F0C1167 CBBB8A2B  0C708369 153E328C AD90147D AFE50952\r\nOK\r\nChecking composer version: OK\r\n```\r\n\r\nWhen I run this command:\r\n\r\n```\r\ncomposer dumpautoload --no-dev\r\ncat vendor/composer/autoload_files.php\r\n```\r\n\r\nI get the following output:\r\n\r\n```\r\n<?php\r\n\r\n// autoload_files.php @generated by Composer\r\n\r\n$vendorDir = dirname(dirname(__FILE__));\r\n$baseDir = dirname($vendorDir);\r\n\r\nreturn array(\r\n    'decc78cc4436b1292c6c0d151b19445c' => $vendorDir . '/phpseclib/phpseclib/phpseclib/bootstrap.php',\r\n    '742b7e606e92b28dd726e835467f413a' => $vendorDir . '/herrera-io/json/src/lib/json_version.php',\r\n    '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php',\r\n    'f0e9d233388e461ee3c460665eb265f0' => $vendorDir . '/herrera-io/phar-update/src/lib/constants.php',\r\n);\r\n```\r\n\r\nAnd I expected this to happen:\r\n\r\nNo files should be included by the autoloader, since `--no-dev` was specified and there are no explicitly autoloaded files outside of those that exist from development dependencies. This applies to all of the required autoload files (namespaces, psr-4, etc), not just `autoload_files.php`.\r\n\r\nPerforming `composer install --no-dev` and subsequently re-dumping the autoloader (with or without the flag) produces the expected output in `vendor/composer/`"}}
{"actor":{"display_login":"Seldaek"}}