From 7fe4123a8906eaada393529dac651ee1c5ec4e33 Mon Sep 17 00:00:00 2001 From: Denny Septian Panggabean Date: Fri, 8 Aug 2025 09:20:15 +0700 Subject: [PATCH 1/5] chore: added PHP 8.5 to Github Action --- .github/workflows/reusable-phpunit-test.yml | 1 + .github/workflows/test-coding-standards.yml | 9 +++++++-- .github/workflows/test-phpunit.yml | 12 ++++++++++++ .github/workflows/test-rector.yml | 2 +- 4 files changed, 21 insertions(+), 3 deletions(-) diff --git a/.github/workflows/reusable-phpunit-test.yml b/.github/workflows/reusable-phpunit-test.yml index bfb641097359..013990fd2e68 100644 --- a/.github/workflows/reusable-phpunit-test.yml +++ b/.github/workflows/reusable-phpunit-test.yml @@ -209,6 +209,7 @@ jobs: DB: ${{ inputs.db-platform }} TACHYCARDIA_MONITOR_GA: ${{ inputs.enable-profiling && 'enabled' || '' }} TERM: xterm-256color + continue-on-error: ${{ inputs.php-version == '8.5' }} - name: Upload coverage results as artifact if: ${{ inputs.enable-artifact-upload }} diff --git a/.github/workflows/test-coding-standards.yml b/.github/workflows/test-coding-standards.yml index a92266f7e3d0..5bb8c0e353ee 100644 --- a/.github/workflows/test-coding-standards.yml +++ b/.github/workflows/test-coding-standards.yml @@ -29,7 +29,7 @@ jobs: matrix: php-version: - '8.1' - - '8.4' + - '8.5' steps: - name: Checkout base branch for PR @@ -64,4 +64,9 @@ jobs: run: composer update --ansi --no-interaction - name: Run lint - run: composer cs + run: | + if [ "${{ matrix.php-version }}" = "8.5" ]; then + composer cs -- --allow-unsupported-php-version=yes + else + composer cs + fi diff --git a/.github/workflows/test-phpunit.yml b/.github/workflows/test-phpunit.yml index 62a8ab0e4338..045570cb27ad 100644 --- a/.github/workflows/test-phpunit.yml +++ b/.github/workflows/test-phpunit.yml @@ -60,6 +60,9 @@ jobs: - '8.2' - '8.3' - '8.4' + include: + - php-version: '8.5' + composer-option: '--ignore-platform-req=php' uses: ./.github/workflows/reusable-phpunit-test.yml # @TODO Extract to codeigniter4/.github repo with: @@ -87,6 +90,7 @@ jobs: - '8.2' - '8.3' - '8.4' + - '8.5' db-platform: - MySQLi - OCI8 @@ -99,6 +103,8 @@ jobs: - php-version: '8.1' db-platform: MySQLi mysql-version: '5.7' + - php-version: '8.5' + composer-option: '--ignore-platform-req=php' uses: ./.github/workflows/reusable-phpunit-test.yml # @TODO Extract to codeigniter4/.github repo with: @@ -127,6 +133,9 @@ jobs: - '8.2' - '8.3' - '8.4' + include: + - php-version: '8.5' + composer-option: '--ignore-platform-req=php' uses: ./.github/workflows/reusable-phpunit-test.yml # @TODO Extract to codeigniter4/.github repo with: @@ -153,6 +162,9 @@ jobs: - '8.2' - '8.3' - '8.4' + include: + - php-version: '8.5' + composer-option: '--ignore-platform-req=php' uses: ./.github/workflows/reusable-phpunit-test.yml # @TODO Extract to codeigniter4/.github repo with: diff --git a/.github/workflows/test-rector.yml b/.github/workflows/test-rector.yml index be469a27d253..3a262ef19498 100644 --- a/.github/workflows/test-rector.yml +++ b/.github/workflows/test-rector.yml @@ -45,7 +45,7 @@ jobs: strategy: fail-fast: false matrix: - php-versions: ['8.1', '8.4'] + php-versions: ['8.1', '8.5'] steps: - name: Checkout base branch for PR if: github.event_name == 'pull_request' From c79b6cd5e55ce71cf92f10edff54567ae514c4d4 Mon Sep 17 00:00:00 2001 From: Denny Septian Panggabean Date: Fri, 8 Aug 2025 10:42:43 +0700 Subject: [PATCH 2/5] ignore platform on utils --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index bebb1f55752b..b3838e624f37 100644 --- a/composer.json +++ b/composer.json @@ -89,7 +89,7 @@ "CodeIgniter\\ComposerScripts::postUpdate" ], "post-autoload-dump": [ - "@composer update --ansi --working-dir=utils" + "@composer update --ansi --working-dir=utils --ignore-platform-req=php" ], "analyze": [ "Composer\\Config::disableProcessTimeout", From 54084d0d7ce44226d70ce80f78c9b39eab1c526b Mon Sep 17 00:00:00 2001 From: Denny Septian Panggabean Date: Fri, 8 Aug 2025 11:17:14 +0700 Subject: [PATCH 3/5] remove conditional php-cs-fixer --- .github/workflows/test-coding-standards.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/test-coding-standards.yml b/.github/workflows/test-coding-standards.yml index 5bb8c0e353ee..1d56a5f1b25b 100644 --- a/.github/workflows/test-coding-standards.yml +++ b/.github/workflows/test-coding-standards.yml @@ -64,9 +64,4 @@ jobs: run: composer update --ansi --no-interaction - name: Run lint - run: | - if [ "${{ matrix.php-version }}" = "8.5" ]; then - composer cs -- --allow-unsupported-php-version=yes - else - composer cs - fi + run: composer cs From 6fd0c8d4900146269e2e7fe5d47e9e61a1da49a0 Mon Sep 17 00:00:00 2001 From: "John Paul E. Balandan, CPA" Date: Thu, 28 Aug 2025 02:41:34 +0800 Subject: [PATCH 4/5] Fix using include --- .github/workflows/test-coding-standards.yml | 6 ++++-- .github/workflows/test-rector.yml | 13 +++++++++---- composer.json | 1 + 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test-coding-standards.yml b/.github/workflows/test-coding-standards.yml index 1d56a5f1b25b..391ecd418a1c 100644 --- a/.github/workflows/test-coding-standards.yml +++ b/.github/workflows/test-coding-standards.yml @@ -29,7 +29,9 @@ jobs: matrix: php-version: - '8.1' - - '8.5' + include: + - php-version: '8.5' + composer-option: '--ignore-platform-req=php' steps: - name: Checkout base branch for PR @@ -61,7 +63,7 @@ jobs: ${{ runner.os }}- - name: Install dependencies - run: composer update --ansi --no-interaction + run: composer update --ansi --no-interaction ${{ matrix.composer-option }} - name: Run lint run: composer cs diff --git a/.github/workflows/test-rector.yml b/.github/workflows/test-rector.yml index 3a262ef19498..3a9f6d649470 100644 --- a/.github/workflows/test-rector.yml +++ b/.github/workflows/test-rector.yml @@ -40,12 +40,17 @@ permissions: jobs: build: - name: PHP ${{ matrix.php-versions }} Analyze code (Rector) + name: PHP ${{ matrix.php-version }} Analyze code (Rector) runs-on: ubuntu-22.04 strategy: fail-fast: false matrix: - php-versions: ['8.1', '8.5'] + php-version: + - '8.1' + include: + - php-version: '8.5' + composer-option: '--ignore-platform-req=php' + steps: - name: Checkout base branch for PR if: github.event_name == 'pull_request' @@ -59,7 +64,7 @@ jobs: - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: ${{ matrix.php-versions }} + php-version: ${{ matrix.php-version }} extensions: intl - name: Use latest Composer @@ -79,7 +84,7 @@ jobs: restore-keys: ${{ runner.os }}-composer- - name: Install dependencies - run: composer update --ansi --no-interaction + run: composer update --ansi --no-interaction ${{ matrix.composer-option }} - name: Rector Cache uses: actions/cache@v4 diff --git a/composer.json b/composer.json index b3838e624f37..f5fdcd0d0420 100644 --- a/composer.json +++ b/composer.json @@ -89,6 +89,7 @@ "CodeIgniter\\ComposerScripts::postUpdate" ], "post-autoload-dump": [ + "@php -r \"if (PHP_VERSION_ID >= 80500) { echo '@todo Remove \"--ignore-platform-req=php\" once deps catch up.', PHP_EOL; }\"", "@composer update --ansi --working-dir=utils --ignore-platform-req=php" ], "analyze": [ From 735573aa0a4e33c728c3fc599f40e0e34342ed51 Mon Sep 17 00:00:00 2001 From: "John Paul E. Balandan, CPA" Date: Thu, 28 Aug 2025 03:01:19 +0800 Subject: [PATCH 5/5] Fix for psalm --- .github/workflows/test-psalm.yml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test-psalm.yml b/.github/workflows/test-psalm.yml index c501714f85e7..cc6c3afaade4 100644 --- a/.github/workflows/test-psalm.yml +++ b/.github/workflows/test-psalm.yml @@ -24,7 +24,12 @@ jobs: build: name: Psalm Analysis runs-on: ubuntu-latest - if: (! contains(github.event.head_commit.message, '[ci skip]')) + + strategy: + fail-fast: false + matrix: + php-version: + - '8.1' steps: - name: Checkout base branch for PR @@ -39,7 +44,7 @@ jobs: - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: '8.1' + php-version: ${{ matrix.php-version }} extensions: intl, json, mbstring, xml, mysqli, oci8, pgsql, sqlsrv, sqlite3 coverage: none env: @@ -66,7 +71,9 @@ jobs: restore-keys: ${{ runner.os }}-psalm- - name: Install dependencies - run: composer update --ansi --no-interaction + run: | + composer require sebastian/diff:^5.0 --ansi --working-dir utils + composer update --ansi --no-interaction - name: Run Psalm analysis run: utils/vendor/bin/psalm