File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44 - push
55 - pull_request
66
7- env :
8- SYMFONY_PHPUNIT_REMOVE_RETURN_TYPEHINT : " 1 "
7+ permissions :
8+ contents : read
99
1010jobs :
1111 tests :
Original file line number Diff line number Diff line change 44 - push
55 - pull_request
66
7+ permissions :
8+ contents : read
9+
710jobs :
811 tests :
912 name : " Lint"
@@ -14,17 +17,34 @@ jobs:
1417 matrix :
1518 php-version :
1619 - " 7.2"
17- - " 8.3 "
20+ - " nightly "
1821
1922 steps :
20- - name : " Checkout"
21- uses : " actions/checkout@v4"
23+ - uses : actions/checkout@v4
2224
23- - name : " Install PHP"
24- uses : " shivammathur/setup-php@v2"
25+ - uses : shivammathur/setup-php@v2
2526 with :
26- coverage : " none"
2727 php-version : " ${{ matrix.php-version }}"
28+ coverage : none
29+
30+ - uses : ramsey/composer-install@v3
31+ with :
32+ dependency-versions : highest
33+
34+ - name : " Lint PHP files"
35+ run : |
36+ hasErrors=0
37+ for f in $(find src/ tests/ -type f -name '*.php' ! -path '*/vendor/*')
38+ do
39+ { error="$(php -derror_reporting=-1 -ddisplay_errors=1 -l -f $f 2>&1 1>&3 3>&-)"; } 3>&1;
40+ if [ "$error" != "" ]; then
41+ while IFS= read -r line; do echo "::error file=$f::$line"; done <<< "$error"
42+ hasErrors=1
43+ fi
44+ done
45+ if [ $hasErrors -eq 1 ]; then
46+ exit 1
47+ fi
2848
2949 - name : " Lint PHP files"
3050 run : " find src/ -type f -name '*.php' -print0 | xargs -0 -L1 -P4 -- php -l -f"
Original file line number Diff line number Diff line change 44 - push
55 - pull_request
66
7- env :
8- SYMFONY_PHPUNIT_VERSION : " "
7+ permissions :
8+ contents : read
99
1010jobs :
1111 tests :
You can’t perform that action at this time.
0 commit comments