From 82dec68234a64575f39bc3db5a2aa8edb7d82d78 Mon Sep 17 00:00:00 2001 From: csemazharul <54615735+csemazharul@users.noreply.github.com> Date: Thu, 27 Aug 2026 15:43:22 +0600 Subject: [PATCH 1/2] chore: add GitHub Actions test workflow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Runs static checks (composer validate, PHPCompatibility, rector) on PHP 8.3 and the pest suite across PHP 8.1–8.4 on push/PR to main. Co-Authored-By: Claude Fable 5 --- .github/workflows/test.yml | 54 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..d049e6e --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,54 @@ +name: Test + +on: + push: + branches: [main] + pull_request: + branches: [main] + +permissions: + contents: read + +jobs: + static: + name: Static checks + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: '8.3' + coverage: none + + - name: Install dependencies + uses: ramsey/composer-install@v3 + + - run: composer validate --no-check-publish --no-interaction + - run: composer compat + - run: composer rector + + test: + name: PHP ${{ matrix.php }} + runs-on: ubuntu-latest + + strategy: + fail-fast: false + matrix: + php: ['8.1', '8.2', '8.3', '8.4'] + + steps: + - uses: actions/checkout@v4 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + coverage: none + + - name: Install dependencies + uses: ramsey/composer-install@v3 + + - run: composer test:unit From 0d454170c5447448b09bd1301f236977c7a0d483 Mon Sep 17 00:00:00 2001 From: csemazharul <54615735+csemazharul@users.noreply.github.com> Date: Thu, 27 Aug 2026 16:14:09 +0600 Subject: [PATCH 2/2] chore: fix PHPCompatibility standard resolution in compat script Point phpcs at the ruleset path directly so it works on fresh installs (CI) without a CodeSniffer.conf registering installed_paths. Also set testVersion to 7.4- to check PHP 7.4 and above. Co-Authored-By: Claude Fable 5 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index a08059e..251ed5c 100644 --- a/composer.json +++ b/composer.json @@ -27,7 +27,7 @@ }, "scripts":{ "test:unit":"./vendor/bin/pest --testdox --colors=always tests/ --exclude-group db", - "compat": "./vendor/bin/phpcs -p ./src --standard=PHPCompatibility --runtime-set testVersion 7.2", + "compat": "./vendor/bin/phpcs -p ./src --standard=vendor/phpcompatibility/php-compatibility/PHPCompatibility --runtime-set testVersion 7.4-", "rector": "./vendor/bin/rector process --dry-run" },