Skip to content

Commit

Permalink
Enhancement: Make plugin compatible with composer/composer:^2
Browse files Browse the repository at this point in the history
  • Loading branch information
localheinz committed Apr 26, 2020
1 parent 48633ea commit 69c86de
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 4 deletions.
12 changes: 12 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,14 @@ 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: "Determine composer cache directory"
id: "determine-composer-cache-directory"
run: "echo \"::set-output name=directory::$(composer config cache-dir)\""
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
],
"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"
Expand Down
31 changes: 28 additions & 3 deletions composer.lock

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

0 comments on commit 69c86de

Please sign in to comment.