1name: PHP Compatibility
2
3on:
4 push:
5 branches:
6 - main
7 pull_request:
8 branches:
9 - main
10 workflow_dispatch:
11
12permissions:
13 contents: read
14
15jobs:
16 php-syntax:
17 name: PHP ${{ matrix.php-version }}
18 runs-on: ubuntu-latest
19
20 strategy:
21 fail-fast: false
22 matrix:
23 php-version:
24 - '8.1'
25 - '8.2'
26 - '8.3'
27 - '8.4'
28 - '8.5'
29
30 steps:
31 - name: Checkout repository
32 uses: actions/checkout@v4
33
34 - name: Setup PHP ${{ matrix.php-version }}
35 uses: shivammathur/setup-php@v2
36 with:
37 php-version: ${{ matrix.php-version }}
38 extensions: mysqli, curl, openssl, gd
39 coverage: none
40
41 - name: Show PHP version
42 run: php -v
43
44 - name: Check PHP syntax
45 run: |
46 find . \
47 -type f \
48 -name "*.php" \
49 -not -path "./vendor/*" \
50 -print0 | xargs -0 -r -n1 php -l