From 5d7d4141a5a0ae641557f48cbd128f8ed9fcb887 Mon Sep 17 00:00:00 2001 From: Ruud Kamphuis Date: Wed, 11 Sep 2024 18:17:47 +0200 Subject: [PATCH 1/3] Allow PHP 8.4 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I don’t get it why this library forcefully disallows installation on higher / unsupported PHP versions. It’s one of the few dependencies that I know that do this. Can we please relax this so that people can start running their CI on PHP 8.4 already to spot issues and report / fix them here. --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 333be9ac..94ae9c31 100644 --- a/composer.json +++ b/composer.json @@ -24,7 +24,7 @@ ], "homepage": "http://moneyphp.org", "require": { - "php": "~8.1.0 || ~8.2.0 || ~8.3.0", + "php": "^8.1", "ext-bcmath": "*", "ext-filter": "*", "ext-json": "*" From 576946aae25f5b64640fe1795bfd10ed270e2ca3 Mon Sep 17 00:00:00 2001 From: Ruud Kamphuis Date: Wed, 11 Sep 2024 18:19:54 +0200 Subject: [PATCH 2/3] Add PHP 8.4 to test matrix --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a6c58887..31a52ae1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -40,6 +40,7 @@ jobs: - '8.1' - '8.2' - '8.3' + - '8.4' steps: - name: Set up PHP From 3f436135ffc38fa9449a354b64ed29a65c3c5d82 Mon Sep 17 00:00:00 2001 From: Ruud Kamphuis Date: Thu, 12 Sep 2024 08:50:23 +0200 Subject: [PATCH 3/3] Use ramsey/composer-install --- .github/workflows/ci.yml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 31a52ae1..d2789ef1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,8 +25,9 @@ jobs: - name: Set up locales run: ./hack/setup-locales.sh - - name: Download dependencies - run: composer update --prefer-stable --prefer-dist --no-interaction --no-progress --no-suggest --prefer-lowest --classmap-authoritative + - uses: "ramsey/composer-install@v3" + with: + dependency-versions: "lowest" - name: Run tests run: composer test @@ -59,8 +60,10 @@ jobs: - name: Set up locales run: ./hack/setup-locales.sh - - name: Download dependencies - run: composer install --classmap-authoritative + - uses: "ramsey/composer-install@v3" + with: + # We need to ignore PHP because Psalm blocks installing it + composer-options: "--ignore-platform-req=php" - name: Run tests run: composer test @@ -79,8 +82,7 @@ jobs: php-version: '8.1' extensions: bcmath, gmp, intl, dom, mbstring - - name: Download dependencies - run: composer install --classmap-authoritative + - uses: "ramsey/composer-install@v3" - name: Psalm run: vendor/bin/psalm