Skip to content

Merge pull request #20 from drnecrotix/ci/prepare-release-workflow #28

Merge pull request #20 from drnecrotix/ci/prepare-release-workflow

Merge pull request #20 from drnecrotix/ci/prepare-release-workflow #28

Workflow file for this run

name: PHP Lint
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
permissions:
contents: read
jobs:
php-lint:
name: PHP syntax
runs-on: ubuntu-latest
strategy:
matrix:
php-version: ['7.4', '8.1', '8.2', '8.3']
steps:
- name: Checkout repository
uses: actions/checkout@v7
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
coverage: none
- name: Lint PHP files
shell: bash
run: |
set -euo pipefail
find . -type f -name '*.php' -not -path './vendor/*' -print0 | xargs -0 -n1 php -l