Provides a composer plugin that extends localheinz/composer-normalize, and automatically normalizes your composer.json on install or update.
Composer Auto Normalize can be installed either globally, or as a per project installation. When using it in a project, we recommend installing it as a dev-dependency.
$ composer global require cupoftea/composer-auto-normalize
$ composer require --dev cupoftea/composer-auto-normalize
Once installed, your composer.json file will be normalized every time a composer install or update is executed.
Because this plugin extends localheinz/composer-normalize, you can also manually normalize your
composer.json by running composer normalize
.
You can set any arguments and options available on the composer normalize
command as a
default for auto normalization. You can configure this both in your global composer.json, or per project in your
project's composer.json file. Arguments should be set in extra.auto-normalize
by their name, and options in
extra.auto-normalize.options
. For a full list of available arguments and options, see the
Composer Normalize Documentation.
{
"extra": {
"auto-normalize": {
"options": {
"indent-size": 2,
"indent-type": "space"
}
}
}
}