File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# SPDX-FileCopyrightText: 2026 LibreSign
22# SPDX-License-Identifier: AGPL-3.0-or-later
33
4- name : lint
4+ name : Lint php
55
6- on :
7- pull_request :
8- push :
9- branches : [main]
6+ on : pull_request
7+
8+ permissions :
9+ contents : read
10+
11+ concurrency :
12+ group : lint-php-${{ github.head_ref || github.run_id }}
13+ cancel-in-progress : true
1014
1115jobs :
12- lint :
16+ php- lint :
1317 runs-on : ubuntu-latest
18+ name : php-lint
19+
1420 steps :
15- - uses : actions/checkout@v6
21+ - name : Checkout
22+ uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
23+ with :
24+ persist-credentials : false
1625 - name : Detect minimum PHP from composer.json
1726 id : php_min
1827 run : |
2231 - uses : shivammathur/setup-php@v2
2332 with :
2433 php-version : ${{ steps.php_min.outputs.version }}
25- - run : composer install --no-interaction --prefer-dist
26- - run : composer bin all install --no-interaction --prefer-dist
27- - run : composer lint
34+
35+ - name : Lint
36+ run : composer run php: lint
Original file line number Diff line number Diff line change 4545 },
4646 "scripts" : {
4747 "lint" : [
48+ " @php:lint" ,
4849 " @cs:check" ,
4950 " @rector:check" ,
5051 " @psalm" ,
5152 " @duplication:check" ,
5253 " @composer:validate"
5354 ],
55+ "php:lint" : " find . -type f -name '*.php' -not -path './vendor/*' -not -path './vendor-bin/*' -not -path './build/*' -print0 | xargs -0 -n1 php -l" ,
5456 "cs:check" : " vendor-bin/phpcs/vendor/squizlabs/php_codesniffer/bin/phpcs -q" ,
5557 "cs:fix" : " vendor-bin/phpcs/vendor/squizlabs/php_codesniffer/bin/phpcbf -q" ,
5658 "rector:check" : " vendor-bin/rector/vendor/rector/rector/bin/rector process --dry-run" ,
You can’t perform that action at this time.
0 commit comments