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",