From cbb07e7ff45bdb1d09f958c74fb915739f78b855 Mon Sep 17 00:00:00 2001 From: Yoanm <4410697+yoanm@users.noreply.github.com> Date: Sat, 30 Aug 2025 10:56:48 +0200 Subject: [PATCH 1/2] Fix behat coverage not generated --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index d604774..2d723fa 100644 --- a/composer.json +++ b/composer.json @@ -41,7 +41,7 @@ "yoanm/jsonrpc-server-sdk": "^3.3" }, "require-dev": { - "behat/behat": "^3.9.0", + "behat/behat": "^3.9.0,<=3.16.1", "dvdoug/behat-code-coverage": "^5.0", "matthiasnoback/symfony-config-test": "^4.0", "matthiasnoback/symfony-dependency-injection-test": "^4.0", From 8ca45b06846ccad61e7c3ffc0287d4989694709a Mon Sep 17 00:00:00 2001 From: Yoanm <4410697+yoanm@users.noreply.github.com> Date: Sat, 30 Aug 2025 11:09:26 +0200 Subject: [PATCH 2/2] Fix behat unstable version --- .github/workflows/reusable-CI-workflow.yml | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/workflows/reusable-CI-workflow.yml b/.github/workflows/reusable-CI-workflow.yml index 69dc61e..a294990 100644 --- a/.github/workflows/reusable-CI-workflow.yml +++ b/.github/workflows/reusable-CI-workflow.yml @@ -128,13 +128,15 @@ jobs: static-checks: name: Static analysis runs-on: ubuntu-latest + env: + SC_PHP_VERSION: 8.2 # Latest supported steps: - uses: actions/checkout@v4 - - name: Setup PHP 8.2 + - name: Setup PHP ${{ env.SC_PHP_VERSION }} uses: shivammathur/setup-php@v2 with: - php-version: 8.2 # Latest supported + php-version: ${{ env.SC_PHP_VERSION }} tools: composer coverage: none env: @@ -148,7 +150,7 @@ jobs: path: | ~/.composer # Clear the cache if composer json (as composer.lock is in the repo) has been updated - key: tests-${{ env.PHP_VERSION }}-${{ hashFiles('composer.json') }} + key: tests-${{ env.SC_PHP_VERSION }}-${{ hashFiles('composer.json') }} - name: Build run: make build @@ -164,7 +166,7 @@ jobs: name: Nightly - PHP ${{ matrix.php-version }} & Symfony ${{ matrix.symfony-version }} runs-on: ubuntu-latest env: - COMPOSER_OPTIONS: '--optimize-autoloader --ignore-platform-req=php+' + COMPOSER_OPTIONS: '--optimize-autoloader --prefer-dist --ignore-platform-req=php+' continue-on-error: true needs: [ static-checks, tests ] strategy: @@ -180,6 +182,9 @@ jobs: include: - symfony-version: '6.3' # Next symfony minor version to manage with latest supported PHP version php-version: '8.2' + - symfony-version: '4.4' # Fix to avoid issue with behat <-> gherkin packages (See https://github.com/Behat/Gherkin/issues/317) + php-version: '8.3' + pkg-extra-constraints: 'behat/gherkin:~4.12.0' steps: - name: Check out code @@ -208,14 +213,15 @@ jobs: - name: Build run: | composer config minimum-stability dev \ - && composer require -W ${{ env.COMPOSER_OPTIONS }} \ + && composer require -W ${{ env.COMPOSER_OPTIONS }} --prefer-stable \ symfony/http-foundation:^${{ matrix.symfony-version }} \ symfony/http-kernel:^${{ matrix.symfony-version }} \ symfony/config:^${{ matrix.symfony-version }} \ symfony/dependency-injection:^${{ matrix.symfony-version }} \ symfony/event-dispatcher:^${{ matrix.symfony-version }} \ symfony/routing:^${{ matrix.symfony-version }} \ - && composer update ${{ env.COMPOSER_OPTIONS }} \ + ${{ matrix.pkg-extra-constraints }} \ + && composer update ${{ env.COMPOSER_OPTIONS }} --prefer-stable \ && make build - name: Test