From 56c495aa32d096c07cd9848bcef1fab167a8fb2b Mon Sep 17 00:00:00 2001 From: Christophe Coevoet Date: Mon, 21 Oct 2024 11:34:44 +0200 Subject: [PATCH 1/2] Clean the CI setup - Remove jobs allowed to fail for stable PHP versions (keeping only jobs that requires passing, making that the default) - Add CI jobs for PHP 8.2, 8.3 and 8.4 - Add an experimental (i.e. allowed to fail) job for PHP nightly - Remove the `variant` from the matrix as it is always `normal` - Remove the step fetching the composer cache location as this location is never used - Upgrade the `ramsey/composer-install` action to avoid deprecation warnings - Make sure jobs for all PHP versions are run until the end even when one of them fails, to make it easier to determine whether a failure is specific to a version --- .github/workflows/run-tests.yml | 31 ++++++------------------------- 1 file changed, 6 insertions(+), 25 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index a8ef732..7e03d74 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -19,27 +19,16 @@ jobs: continue-on-error: ${{ matrix.allowed-to-fail }} strategy: + fail-fast: false matrix: - php-version: ['7.4', '8.0', '8.1'] - variant: [normal] + php-version: ['7.4', '8.0', '8.1', '8.2', '8.3', '8.4'] dependencies: [highest] - allowed-to-fail: [true] + allowed-to-fail: [false] symfony-version: [latest] include: - - php-version: '7.4' + - php-version: nightly dependencies: highest - variant: normal - allowed-to-fail: false - symfony-version: latest - - php-version: '8.0' - dependencies: highest - variant: normal - allowed-to-fail: false - symfony-version: latest - - php-version: '8.1' - dependencies: highest - variant: normal - allowed-to-fail: false + allowed-to-fail: true symfony-version: latest steps: - name: "Checkout code" @@ -53,16 +42,8 @@ jobs: tools: composer:v2 extensions: intl, xdebug - - name: "Set composer cache directory" - id: composer-cache - run: echo "::set-output name=dir::$(composer config cache-files-dir)" - - - name: Install variant - if: matrix.variant != 'normal' - run: composer require ${{ matrix.variant }} --no-update - - name: "Install Composer dependencies (${{ matrix.dependencies }})" - uses: "ramsey/composer-install@v1" + uses: "ramsey/composer-install@v3" with: dependency-versions: "${{ matrix.dependencies }}" composer-options: "--prefer-dist" From 9be10cf818c8b5a14bee5f08d96037d01b790c4c Mon Sep 17 00:00:00 2001 From: Christophe Coevoet Date: Thu, 20 Feb 2025 13:04:03 +0100 Subject: [PATCH 2/2] Fix deprecation for implicit nullable parameters --- Dumper/TranslationDumper.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dumper/TranslationDumper.php b/Dumper/TranslationDumper.php index 6d53249..f5d8d0f 100644 --- a/Dumper/TranslationDumper.php +++ b/Dumper/TranslationDumper.php @@ -118,13 +118,13 @@ public function addLoader($id, $loader) * @param string $target Target directory. * @param string $pattern route path * @param string[] $formats Formats to generate. - * @param \stdClass $merge Merge options. + * @param \stdClass|null $merge Merge options. */ public function dump( $target = 'web/js', $pattern = self::DEFAULT_TRANSLATION_PATTERN, array $formats = array(), - \stdClass $merge = null + ?\stdClass $merge = null ) { $availableFormats = array('js', 'json');