From 76d38e3a871d3c992845542785bcf9dcd4d4bd41 Mon Sep 17 00:00:00 2001 From: Andreas Heigl Date: Fri, 18 Oct 2024 11:42:36 +0200 Subject: [PATCH 1/2] Allow tests to run on PHP8.4 This then also prepares the package to be released for PHP8.4 runtimes (cherry picked from commit 0a5575e1e3d23dfabb8ccf38dc07c0ced251d820) --- .github/workflows/ci.yaml | 8 ++++++++ app/composer.json | 2 +- composer.json | 2 +- src/backup-code/composer.json | 2 +- src/bundle/composer.json | 2 +- src/email/composer.json | 2 +- src/google-authenticator/composer.json | 2 +- src/totp/composer.json | 2 +- src/trusted-device/composer.json | 2 +- 9 files changed, 16 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 2a1caaeb..16540c7e 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -60,6 +60,11 @@ jobs: # Test against Symfony 6.* - php-version: '8.3' symfony-version: '6.*' + + # Test against Symfony 6.4 on PHP8.4 + - php-version: '8.4' + symfony-version: '6.4.*' + steps: - name: 'Checkout code' uses: actions/checkout@v3 @@ -97,6 +102,9 @@ jobs: - php-version: '8.3' symfony-version: '6.*' + # Test against Symfony 6.4 on PHP8.4 + - php-version: '8.4' + symfony-version: '6.4.*' steps: - name: 'Checkout code' uses: actions/checkout@v3 diff --git a/app/composer.json b/app/composer.json index 026605a6..14f8e45a 100644 --- a/app/composer.json +++ b/app/composer.json @@ -2,7 +2,7 @@ "type": "project", "license": "MIT", "require": { - "php": "~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0", + "php": "~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0", "ext-json": "*", "doctrine/doctrine-bundle": "^2.0.3", "doctrine/orm": "^2.9", diff --git a/composer.json b/composer.json index 52a0f1eb..7028131f 100644 --- a/composer.json +++ b/composer.json @@ -12,7 +12,7 @@ } ], "require": { - "php": "~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0", + "php": "~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0", "ext-json": "*", "lcobucci/clock": "^2.0 || ^3.0", "lcobucci/jwt": "^4.1 || ^5.0", diff --git a/src/backup-code/composer.json b/src/backup-code/composer.json index c4e3ed71..df785a42 100644 --- a/src/backup-code/composer.json +++ b/src/backup-code/composer.json @@ -12,7 +12,7 @@ } ], "require": { - "php": "~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0", + "php": "~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0", "scheb/2fa-bundle": "self.version" }, "autoload": { diff --git a/src/bundle/composer.json b/src/bundle/composer.json index b969e898..35a9e178 100644 --- a/src/bundle/composer.json +++ b/src/bundle/composer.json @@ -12,7 +12,7 @@ } ], "require": { - "php": "~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0", + "php": "~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0", "ext-json": "*", "symfony/config": "^5.4 || ^6.0", "symfony/dependency-injection": "^5.4 || ^6.0", diff --git a/src/email/composer.json b/src/email/composer.json index 4e75d69d..b2b3928f 100644 --- a/src/email/composer.json +++ b/src/email/composer.json @@ -12,7 +12,7 @@ } ], "require": { - "php": "~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0", + "php": "~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0", "scheb/2fa-bundle": "self.version" }, "autoload": { diff --git a/src/google-authenticator/composer.json b/src/google-authenticator/composer.json index c39ab15d..91064f79 100644 --- a/src/google-authenticator/composer.json +++ b/src/google-authenticator/composer.json @@ -12,7 +12,7 @@ } ], "require": { - "php": "~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0", + "php": "~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0", "scheb/2fa-bundle": "self.version", "spomky-labs/otphp": "^10.0 || ^11.0", "paragonie/constant_time_encoding": "^2.4" diff --git a/src/totp/composer.json b/src/totp/composer.json index b68d5300..62ad80cd 100644 --- a/src/totp/composer.json +++ b/src/totp/composer.json @@ -12,7 +12,7 @@ } ], "require": { - "php": "~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0", + "php": "~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0", "scheb/2fa-bundle": "self.version", "spomky-labs/otphp": "^10.0 || ^11.0", "paragonie/constant_time_encoding": "^2.4" diff --git a/src/trusted-device/composer.json b/src/trusted-device/composer.json index c78ce12f..8fc6624b 100644 --- a/src/trusted-device/composer.json +++ b/src/trusted-device/composer.json @@ -12,7 +12,7 @@ } ], "require": { - "php": "~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0", + "php": "~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0", "scheb/2fa-bundle": "self.version", "lcobucci/clock": "^2.0 || ^3.0", "lcobucci/jwt": "^4.1 || ^5.0" From bcaabde92700ac69831b7d74ee142269e2e5574d Mon Sep 17 00:00:00 2001 From: Andreas Heigl Date: Sat, 19 Oct 2024 19:23:52 +0200 Subject: [PATCH 2/2] Remove psalm from most installations As Psalm is only used in one single job it can be removed in general and then reinstalled when it is actually required before it is executed. This process allows to keep Psalm in the dev-dependencies so that constributors still have it available but in CI-runs it needs not to be installed when it is not executed. (cherry picked from commit 42c84764455b8f151b132d5b32d07e7bc0bdce5c) --- .github/actions/setup-build/action.yaml | 4 ++++ .github/workflows/ci.yaml | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/actions/setup-build/action.yaml b/.github/actions/setup-build/action.yaml index 11a266b9..2883f25a 100644 --- a/.github/actions/setup-build/action.yaml +++ b/.github/actions/setup-build/action.yaml @@ -62,6 +62,10 @@ runs: shell: bash run: composer require ${{ inputs.composer-require }} --dev --no-update --working-dir=${{ inputs.composer-working-dir }} + - name: "Remove Psalm from dependencies" + shell: bash + run: composer remove --dev vimeo/psalm + - name: "Validate composer.json" shell: bash run: composer validate --no-check-publish --no-check-lock --working-dir=${{ inputs.composer-working-dir }} diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 16540c7e..1ccafa74 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -36,7 +36,9 @@ jobs: - name: "Psalm" if: always() - run: vendor/bin/psalm + run: | + composer require -W --dev vimeo/psalm:^5.0 + vendor/bin/psalm unit-tests: name: "Unit Tests - PHP ${{ matrix.php-version }}, Sf ${{ matrix.symfony-version }}${{ matrix.dependency-versions && format(', Deps: {0}', matrix.dependency-versions) }}"