From cb9e0f02256944baf6a770a279ed7096847264b4 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Tue, 9 Apr 2024 00:12:27 -0700 Subject: [PATCH 1/2] composer.json - Switch to civicrm/gitignore fork (w/php83 support) --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 508da19..81f7f11 100644 --- a/composer.json +++ b/composer.json @@ -16,7 +16,7 @@ "require": { "composer-plugin-api": "^1.1 || ^2.0", "php": ">=7.2", - "togos/gitignore": "~1.1.1" + "civicrm/gitignore": "~1.2.0" }, "require-dev": { "composer/composer": "~1.0 || ~2.0", From e305f035b33cd1ee0a716a0a1086da73bbad8ef5 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Tue, 9 Apr 2024 00:30:34 -0700 Subject: [PATCH 2/2] Drop support for composer v1 All the PHP code should still be compatible with composer@1.x. So why? * We need to swap-out an abandoned dependency (`togos/gitignore` => `civicrm/gitignore`) to address compatibility w/php82. * But packagist.org refuses to serve metadata for new dependencies (like `civicrm/gitignore`) to composer@1.x clients... regardless of substantive compatibility. * So it's a metadata problem (not a code problem). But it still affects operations... if composer@1.x cannot download then code, then it won't work! * Effectively, it's strict XOR: run cleanly on php82... XOR... keep compatibility with composer@1.x. Between those, php82 seems more important. --- .github/workflows/main.yml | 2 +- composer.json | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8175e36..d66a374 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -12,7 +12,7 @@ jobs: matrix: php: [7.2, 7.3, 7.4, 8.0, 8.1] os: [ubuntu-latest] - composer: [v1, v2] + composer: [v2] name: ${{ matrix.php }} - PHPUnit - Composer ${{ matrix.composer }} steps: - uses: actions/checkout@v2 diff --git a/composer.json b/composer.json index 81f7f11..71cf2fb 100644 --- a/composer.json +++ b/composer.json @@ -14,12 +14,12 @@ } ], "require": { - "composer-plugin-api": "^1.1 || ^2.0", + "composer-plugin-api": "^2.0", "php": ">=7.2", "civicrm/gitignore": "~1.2.0" }, "require-dev": { - "composer/composer": "~1.0 || ~2.0", + "composer/composer": "~2.0", "phpunit/phpunit": "^8.5 || ^9.5", "friendsofphp/php-cs-fixer": "^2.3", "totten/process-helper": "^1.0.1"