Skip to content

Commit d846594

Browse files
committed
Lint PHP files in CI
`php -l` didn't handle multiple source file arguments until PHP 8.2 so we need to use a loop to process everything. We have an outstanding lint error in Log/sql.php under PHP 7.x ("mixed property cannot have a default value"). For now, just skip running lint on that version.
1 parent 4b36221 commit d846594

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

.github/workflows/ci.yml

+5-3
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ jobs:
2424
php-version: ${{ matrix.php-version }}
2525
extensions: sqlite
2626
ini-values: include_path=.:/usr/share/php
27-
- name: Run tests
28-
run: |
29-
pear run-tests -d tests/
27+
- name: Lint
28+
if: ${{ matrix.php-version != '7.4' }}
29+
run: for f in ./**/*.php; do php -l "$f"; done;
30+
- name: Tests
31+
run: pear run-tests -d tests/

0 commit comments

Comments
 (0)