From 30b0b95765baff42b0de6277201b18a6574f979e Mon Sep 17 00:00:00 2001 From: Sylvain Fabre Date: Wed, 7 Jan 2026 11:21:00 +0100 Subject: [PATCH] Add PHP 8.4 support and require PHP 8.3+ --- .github/workflows/build.yml | 114 ++++++++++++++++++------------------ composer.json | 2 +- 2 files changed, 58 insertions(+), 58 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d1cba73..e4f23b8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,57 +1,57 @@ -name: Build - -on: - push: - branches: [ master ] - pull_request: - types: [opened, synchronize, reopened] - -jobs: - build: - strategy: - matrix: - php-versions: ['8.2','8.3'] - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - with: - fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis - - - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php-versions }} - - - run: composer validate --strict - - run: composer config --no-plugins allow-plugins.dealerdirect/phpcodesniffer-composer-installer true - - run: composer install --prefer-dist --no-progress --no-suggest - - - run: vendor/bin/phpcs - if: ${{ failure() || success() }} - - - run: vendor/bin/phpstan - if: ${{ failure() || success() }} - - - run: vendor/bin/rector process --dry-run - if: ${{ failure() || success() }} - - - run: XDEBUG_MODE=coverage vendor/bin/phpunit --coverage-clover ./clover.xml --log-junit ./phpunit.report.xml - if: ${{ failure() || success() }} - - # https://community.sonarsource.com/t/code-coverage-doesnt-work-with-github-action/16747 - # $GITHUB_WORKSPACE contains a slash so @ is used as delimiter - - run: sed -i 's@'$GITHUB_WORKSPACE'@/github/workspace/@g' clover.xml - - run: sed -i 's@'$GITHUB_WORKSPACE'@/github/workspace/@g' phpunit.report.xml - - - uses: sonarsource/sonarcloud-github-action@master - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - with: - args: > - -Dsonar.projectName=absolute-percent-value-bundle - -Dsonar.projectKey=assoconnect_absolute-percent-value-bundle - -Dsonar.organization=assoconnect - -Dsonar.sources=src - -Dsonar.tests=tests - -Dsonar.php.coverage.reportPaths=./clover.xml - -Dsonar.php.tests.reportPath=./phpunit.report.xml +name: Build + +on: + push: + branches: [ master ] + pull_request: + types: [opened, synchronize, reopened] + +jobs: + build: + strategy: + matrix: + php-versions: ['8.3', '8.4'] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis + + - uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-versions }} + + - run: composer validate --strict + - run: composer config --no-plugins allow-plugins.dealerdirect/phpcodesniffer-composer-installer true + - run: composer install --prefer-dist --no-progress --no-suggest + + - run: vendor/bin/phpcs + if: ${{ failure() || success() }} + + - run: vendor/bin/phpstan + if: ${{ failure() || success() }} + + - run: vendor/bin/rector process --dry-run + if: ${{ failure() || success() }} + + - run: XDEBUG_MODE=coverage vendor/bin/phpunit --coverage-clover ./clover.xml --log-junit ./phpunit.report.xml + if: ${{ failure() || success() }} + + # https://community.sonarsource.com/t/code-coverage-doesnt-work-with-github-action/16747 + # $GITHUB_WORKSPACE contains a slash so @ is used as delimiter + - run: sed -i 's@'$GITHUB_WORKSPACE'@/github/workspace/@g' clover.xml + - run: sed -i 's@'$GITHUB_WORKSPACE'@/github/workspace/@g' phpunit.report.xml + + - uses: sonarsource/sonarcloud-github-action@master + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + with: + args: > + -Dsonar.projectName=absolute-percent-value-bundle + -Dsonar.projectKey=assoconnect_absolute-percent-value-bundle + -Dsonar.organization=assoconnect + -Dsonar.sources=src + -Dsonar.tests=tests + -Dsonar.php.coverage.reportPaths=./clover.xml + -Dsonar.php.tests.reportPath=./phpunit.report.xml diff --git a/composer.json b/composer.json index 3954b86..60db74e 100644 --- a/composer.json +++ b/composer.json @@ -25,7 +25,7 @@ "assoconnect/php-quality-config": "^1.16" }, "require": { - "php": "^8.2", + "php": "^8.3", "symfony/framework-bundle": "^5.0|^6.0|^7.0", "symfony/serializer": "^5.1.8|^6.0|^7.0", "beberlei/assert": "^3.2.7"