From 193df059680149047e0e1b5179a06b7b63a50356 Mon Sep 17 00:00:00 2001 From: William Jacoby Date: Sun, 27 Sep 2026 18:42:52 -0500 Subject: [PATCH] Require PHP 7.4 and phpBB 3.3.19, and add a PHP lint workflow Tested on phpBB 3.3.19 under PHP 8.4. The lint workflow checks PHP syntax on 7.4 (the new minimum) and 8.4 (the newest phpBB 3.3 supports). Co-Authored-By: Claude Opus 5.5 --- .github/workflows/lint.yml | 38 ++++++++++++++++++++++++++++++++++++++ composer.json | 4 ++-- 2 files changed, 40 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/lint.yml diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..ef48cd3 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,38 @@ +name: Lint + +# PHP syntax check on the lowest PHP version this extension supports and the +# newest one phpBB 3.3 supports. tests.yml covers PHP 8.2 with phpBB's own +# checks (code sniffer, EPV). +on: + push: + branches: + - master + pull_request: + branches: + - master + +permissions: + contents: read + +jobs: + lint: + name: PHP ${{ matrix.php }} lint + runs-on: ubuntu-latest + strategy: + matrix: + php: ['7.4', '8.4'] + steps: + - uses: actions/checkout@v4 + + - name: Set up PHP ${{ matrix.php }} + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + coverage: none + tools: composer:v2 + + - name: PHP syntax check + run: find . -name '*.php' -not -path './.git/*' -not -path './vendor/*' -print0 | xargs -0 -n1 php -l + + - name: Validate composer.json + run: composer validate --no-check-all --no-check-publish diff --git a/composer.json b/composer.json index 09b7919..2be3cb8 100644 --- a/composer.json +++ b/composer.json @@ -28,12 +28,12 @@ } ], "require": { - "php": ">=5.3" + "php": ">=7.4" }, "extra": { "display-name": "Annual Stars", "soft-require": { - "phpbb/phpbb": ">=3.1.2" + "phpbb/phpbb": ">=3.3.19,<4.0.0@dev" }, "version-check": { "host": "www.phpbb.com",