From dcdae1004e00229b53a61c949a62440286970d93 Mon Sep 17 00:00:00 2001 From: Michael Vasseur <14887731+vmcj@users.noreply.github.com> Date: Sun, 21 Dec 2025 00:04:31 +0100 Subject: [PATCH] Use alternative image with newest version IRC we needed the development branch for PHPCS support for PHP8.4, PHP8.4 support is still not backported (even now PHP8.5 is out). We switch to another image as we now install the tool ourselves in our image. We used the default container as it would make maintenance easier but now we needed to patch the composer.json a couple of times so doing this ourselves from the start is easier. --- .github/jobs/fix_pipelinecomponents_image.sh | 24 -------------------- .github/workflows/codestyle.yml | 7 ++---- 2 files changed, 2 insertions(+), 29 deletions(-) delete mode 100755 .github/jobs/fix_pipelinecomponents_image.sh diff --git a/.github/jobs/fix_pipelinecomponents_image.sh b/.github/jobs/fix_pipelinecomponents_image.sh deleted file mode 100755 index 8723b86f1b..0000000000 --- a/.github/jobs/fix_pipelinecomponents_image.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh - -# We can't convert this script to bash as GHA doesn't have bash installed -# -# The current script doesn't use a piped command so the "benefit" of using -# pipefail is not there over the hassle of maintaining another container. -set -eux - -echo "Set plugin config for version detection" -phpcs --config-set installed_paths /app/vendor/phpcompatibility/php-compatibility - -# Current released version does not know enums -echo "Upgrade the compatibility for PHP versions" -mydir=$(pwd) - -echo "Before /app/composer.json:" -cat /app/composer.json -sed -i 's/"phpcompatibility\/php-compatibility": "9.3.5"/"phpcompatibility\/php-compatibility": "dev-develop"/g' /app/composer.json -sed -i 's/"squizlabs\/php_codesniffer": "3.13.2"/"squizlabs\/php_codesniffer": "^3.13.3"/g' /app/composer.json -echo "After /app/composer.json:" -cat /app/composer.json - -cd /app; composer update -cd $mydir diff --git a/.github/workflows/codestyle.yml b/.github/workflows/codestyle.yml index 0dbddf8f72..45dfc49e2f 100644 --- a/.github/workflows/codestyle.yml +++ b/.github/workflows/codestyle.yml @@ -43,18 +43,15 @@ jobs: phpcs_compatibility: runs-on: ubuntu-latest container: - image: pipelinecomponents/php-codesniffer:latest + image: domjudge/gitlabci:24.04 strategy: matrix: PHPVERSION: ["8.1", "8.2", "8.3", "8.4"] steps: - - run: apk add git - uses: actions/checkout@v4 - - name: Various fixes to this image - run: .github/jobs/fix_pipelinecomponents_image.sh - name: Detect compatibility with supported PHP version run: > - phpcs -s -p --colors + /vendor/bin/phpcs -s -p --colors --standard=PHPCompatibility --extensions=php --runtime-set testVersion ${{ matrix.PHPVERSION }}