Skip to content

Commit

Permalink
Merge pull request #608 from ergebnis/feature/extra
Browse files Browse the repository at this point in the history
Enhancement: Allow configuration via composer extra
  • Loading branch information
localheinz authored Nov 1, 2020
2 parents 0b22da7 + 494be82 commit dc26e71
Show file tree
Hide file tree
Showing 25 changed files with 1,113 additions and 9 deletions.
15 changes: 13 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,15 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

## Unreleased

For a full diff see [`2.9.1...main`][2.9.1...main].
For a full diff see [`2.10.0...main`][2.10.0...main].

## [`2.10.0`][2.10.0]

For a full diff see [`2.9.1...2.10.0`][2.9.1...2.10.0].

### Added

* Allowed configuration via composer extra ([#608]), by [@localheinz]

## [`2.9.1`][2.9.1]

Expand Down Expand Up @@ -475,6 +483,7 @@ For a full diff see [`81bc3a8...0.1.0`][81bc3a8...0.1.0].
[2.8.2]: https://github.com/ergebnis/composer-normalize/releases/tag/2.8.2
[2.9.0]: https://github.com/ergebnis/composer-normalize/releases/tag/2.9.0
[2.9.1]: https://github.com/ergebnis/composer-normalize/releases/tag/2.9.1
[2.10.0]: https://github.com/ergebnis/composer-normalize/releases/tag/2.10.0

[81bc3a8...0.1.0]: https://github.com/ergebnis/composer-normalize/compare/81bc3a8...0.1.0
[0.1.0...0.2.0]: https://github.com/ergebnis/composer-normalize/compare/0.1.0...0.2.0
Expand Down Expand Up @@ -520,7 +529,8 @@ For a full diff see [`81bc3a8...0.1.0`][81bc3a8...0.1.0].
[2.8.1...2.8.2]: https://github.com/ergebnis/composer-normalize/compare/2.8.1...2.8.2
[2.8.2...2.9.0]: https://github.com/ergebnis/composer-normalize/compare/2.8.2...2.9.0
[2.9.0...2.9.1]: https://github.com/ergebnis/composer-normalize/compare/2.9.0...2.9.1
[2.9.1...main]: https://github.com/ergebnis/composer-normalize/compare/2.9.1...main
[2.9.1...2.10.0]: https://github.com/ergebnis/composer-normalize/compare/2.9.1...2.10.0
[2.10.0...main]: https://github.com/ergebnis/composer-normalize/compare/2.10.0...main

[#1]: https://github.com/ergebnis/composer-normalize/pull/1
[#2]: https://github.com/ergebnis/composer-normalize/pull/2
Expand Down Expand Up @@ -588,6 +598,7 @@ For a full diff see [`81bc3a8...0.1.0`][81bc3a8...0.1.0].
[#582]: https://github.com/ergebnis/composer-normalize/pull/582
[#596]: https://github.com/ergebnis/composer-normalize/pull/596
[#597]: https://github.com/ergebnis/composer-normalize/pull/597
[#608]: https://github.com/ergebnis/composer-normalize/pull/608

[@core23]: https://github.com/core23
[@dependabot]: https://github.com/dependabot
Expand Down
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,21 @@ The `NormalizeCommand` provided by the `NormalizePlugin` within this package wil
* `--no-check-lock`: Do not check if lock file is up to date
* `--no-update-lock`: Do not update lock file if it exists

As an alternative to specifying the `--indent-size` and `--indent-style` options, you can also use composer [extra](https://getcomposer.org/doc/04-schema.md#extra) to configure these options in `composer.json`:

```json
{
"extra": {
"composer-normalize": {
"indent-size": 2,
"indent-style": "space",
}
}
}
```

:bulb: The configuration provided in composer extra always overrides the configuration provided via command line options.

### Continuous Integration

If you want to run this in continuous integration services, use the `--dry-run` option.
Expand Down
6 changes: 5 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,11 @@
"sort-packages": true
},
"extra": {
"class": "Ergebnis\\Composer\\Normalize\\NormalizePlugin"
"class": "Ergebnis\\Composer\\Normalize\\NormalizePlugin",
"composer-normalize": {
"indent-size": 2,
"indent-style": "space"
}
},
"autoload": {
"psr-4": {
Expand Down
Loading

0 comments on commit dc26e71

Please sign in to comment.