オプションを毎回付けるのが面倒
面倒な上に忘れがち。
$ composer install -o
$ composer dump-autoload -o
デフォルトでオプションを付ける
composer.json
のconfig
から設定できます。
composer.json
{
"config": {
"optimize-autoloader": true
}
}
設定後は自動でオプションが適用されます。
# オプションなしでOK
$ composer install
$ composer dump-autoload
設定方法の詳細は公式ドキュメントに掲載されています。