cupoftea/composer-auto-normalize

Provides a composer plugin that automatically normalizes your composer.json on install or update

v1.1.0 2019-06-11 02:21 UTC

This package is auto-updated.

Last update: 2024-11-12 02:07:21 UTC


README

Latest Stable Version Total Downloads Latest Unstable Version StyleCI License

Provides a composer plugin that extends localheinz/composer-normalize, and automatically normalizes your composer.json on install or update.

Installation

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

Usage

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.

Configuration

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"
            }
        }
    }
}