Skip to content

Commit

Permalink
Merge pull request #412 from ergebnis/feature/composer
Browse files Browse the repository at this point in the history
Enhancement: Make plugin compatible with composer/composer:^2
  • Loading branch information
localheinz authored Apr 26, 2020
2 parents dd81405 + c55712a commit 6129311
Show file tree
Hide file tree
Showing 6 changed files with 62 additions and 17 deletions.
37 changes: 25 additions & 12 deletions .github/settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,31 @@ branches:
- "Dependency Analysis (7.4, locked)"
- "Label"
- "Static Code Analysis (7.4, locked)"
- "Tests (7.1, highest)"
- "Tests (7.1, locked)"
- "Tests (7.1, lowest)"
- "Tests (7.2, highest)"
- "Tests (7.2, locked)"
- "Tests (7.2, lowest)"
- "Tests (7.3, highest)"
- "Tests (7.3, locked)"
- "Tests (7.3, lowest)"
- "Tests (7.4, highest)"
- "Tests (7.4, locked)"
- "Tests (7.4, lowest)"
- "Static Code Analysis (7.4, locked)"
- "Tests (7.1, 1, highest)"
- "Tests (7.1, 1, locked)"
- "Tests (7.1, 1, lowest)"
- "Tests (7.1, 2, highest)"
- "Tests (7.1, 2, locked)"
- "Tests (7.1, 2, lowest)"
- "Tests (7.2, 1, highest)"
- "Tests (7.2, 1, locked)"
- "Tests (7.2, 1, lowest)"
- "Tests (7.2, 2, highest)"
- "Tests (7.2, 2, locked)"
- "Tests (7.2, 2, lowest)"
- "Tests (7.3, 1, highest)"
- "Tests (7.3, 1, locked)"
- "Tests (7.3, 1, lowest)"
- "Tests (7.3, 2, highest)"
- "Tests (7.3, 2, locked)"
- "Tests (7.3, 2, lowest)"
- "Tests (7.4, 1, highest)"
- "Tests (7.4, 1, locked)"
- "Tests (7.4, 1, lowest)"
- "Tests (7.4, 2, highest)"
- "Tests (7.4, 2, locked)"
- "Tests (7.4, 2, lowest)"
strict: false
restrictions:

Expand Down
15 changes: 15 additions & 0 deletions .github/workflows/integrate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,10 @@ jobs:
- "7.3"
- "7.4"

composer-version:
- "1"
- "2"

dependencies:
- "lowest"
- "locked"
Expand All @@ -242,6 +246,17 @@ jobs:
extensions: "${{ env.REQUIRED_PHP_EXTENSIONS }}"
php-version: "${{ matrix.php-version }}"

- name: "Install composer:^1"
if: "matrix.composer-version == '1'"
run: "composer self-update ${{ env.COMPOSER_VERSION }}"

- name: "Install composer:^2"
if: "matrix.composer-version == '2'"
run: "composer self-update --snapshot"

- name: "Show composer version"
run: "composer --version"

- name: "Determine composer cache directory"
id: "determine-composer-cache-directory"
run: "echo \"::set-output name=directory::$(composer config cache-dir)\""
Expand Down
12 changes: 10 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,16 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

## Unreleased

For a full diff see [`2.3.2...master`][2.3.2...master].
For a full diff see [`2.4.0...master`][2.4.0...master].

## [`2.4.0`][2.4.0]

For a full diff see [`2.3.2...2.4.0`][2.3.2...2.4.0].

### Changed

* Started showing validation error messages as obtained from validation instead of relying on on executing composer validate ([#406]), by [@localheinz]
* Made plugin compatible with `composer/composer:^2.0.0` ([#412]), by [@localheinz]

## [`2.3.2`][2.3.2]

Expand Down Expand Up @@ -359,6 +364,7 @@ For a full diff see [`81bc3a8...0.1.0`][81bc3a8...0.1.0].
[2.3.0]: https://github.com/ergebnis/composer-normalize/releases/tag/2.3.0
[2.3.1]: https://github.com/ergebnis/composer-normalize/releases/tag/2.3.1
[2.3.2]: https://github.com/ergebnis/composer-normalize/releases/tag/2.3.2
[2.4.0]: https://github.com/ergebnis/composer-normalize/releases/tag/2.4.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 @@ -392,7 +398,8 @@ For a full diff see [`81bc3a8...0.1.0`][81bc3a8...0.1.0].
[2.2.4...2.3.0]: https://github.com/ergebnis/composer-normalize/compare/2.2.4...2.3.0
[2.3.0...2.3.1]: https://github.com/ergebnis/composer-normalize/compare/2.3.0...2.3.1
[2.3.1...2.3.2]: https://github.com/ergebnis/composer-normalize/compare/2.3.1...2.3.2
[2.3.2...master]: https://github.com/ergebnis/composer-normalize/compare/2.3.2...master
[2.3.2...2.4.0]: https://github.com/ergebnis/composer-normalize/compare/2.4.0...master
[2.4.0...master]: https://github.com/ergebnis/composer-normalize/compare/2.4.0...master

[#1]: https://github.com/ergebnis/composer-normalize/pull/1
[#2]: https://github.com/ergebnis/composer-normalize/pull/2
Expand Down Expand Up @@ -441,6 +448,7 @@ For a full diff see [`81bc3a8...0.1.0`][81bc3a8...0.1.0].
[#379]: https://github.com/ergebnis/composer-normalize/pull/379
[#380]: https://github.com/ergebnis/composer-normalize/pull/380
[#406]: https://github.com/ergebnis/composer-normalize/pull/406
[#412]: https://github.com/ergebnis/composer-normalize/pull/412

[@ergebnis]: https://github.com/ergebnis
[@ergebnis-bot]: https://github.com/ergebnis-bot
Expand Down
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,14 @@
],
"require": {
"php": "^7.1",
"composer-plugin-api": "^1.1.0",
"composer-plugin-api": "^1.1.0 || ^2.0.0",
"ergebnis/json-normalizer": "~0.12.0",
"ergebnis/json-printer": "^3.0.2",
"localheinz/diff": "^1.0.1"
},
"require-dev": {
"composer/composer": "^1.10.5",
"composer/package-versions-deprecated": "^1.8.0",
"ergebnis/license": "~0.1.0",
"ergebnis/php-cs-fixer-config": "^2.1.2",
"ergebnis/phpstan-rules": "~0.14.4",
Expand Down
4 changes: 2 additions & 2 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions src/NormalizePlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,14 @@ public function activate(Composer $composer, IO\IOInterface $io): void
{
}

public function deactivate(Composer $composer, IO\IOInterface $io): void
{
}

public function uninstall(Composer $composer, IO\IOInterface $io): void
{
}

public function getCapabilities(): array
{
return [
Expand Down

0 comments on commit 6129311

Please sign in to comment.