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 dd81405 commit 2a6adef
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 15 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
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
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 2a6adef

Please sign in to comment.