File tree Expand file tree Collapse file tree 8 files changed +48
-90
lines changed Expand file tree Collapse file tree 8 files changed +48
-90
lines changed Original file line number Diff line number Diff line change 1- /.build export-ignore
2- /.github export-ignore
3- /.idea export-ignore
4- /.phan export-ignore
5- /.phpdoc export-ignore
6- /docs export-ignore
7- /examples export-ignore
8- /tests export-ignore
9- /.editorconfig export-ignore
10- /.gitattributes export-ignore
11- /.gitignore export-ignore
12- /.readthedocs.yml export-ignore
13- /composer.lock export-ignore
14- /phpcs.xml.dist export-ignore
15- /phpdoc.xml.dist export-ignore
16- /phpmd.xml.dist export-ignore
17- /phpunit.xml.dist export-ignore
1+ /.build export-ignore
2+ /.github export-ignore
3+ /.idea export-ignore
4+ /.phan export-ignore
5+ /.phpdoc export-ignore
6+ /docs export-ignore
7+ /examples export-ignore
8+ /tests export-ignore
9+ /.editorconfig export-ignore
10+ /.gitattributes export-ignore
11+ /.gitignore export-ignore
12+ /.readthedocs.yml export-ignore
13+ /composer.lock export-ignore
14+ /phpcs.xml.dist export-ignore
15+ /phpdoc.xml.dist export-ignore
16+ /phpmd.xml.dist export-ignore
17+ /phpunit.xml.dist export-ignore
18+ /phpstan.dist.neon export-ignore
19+ /phpstan-baseline.neon export-ignore
1820
1921* .php diff =php
Original file line number Diff line number Diff line change 3838 - " 8.2"
3939 - " 8.3"
4040
41- env :
42- PHAN_ALLOW_XDEBUG : 0
43- PHAN_DISABLE_XDEBUG_WARN : 1
44-
4541 steps :
4642 - name : " Checkout"
4743 uses : actions/checkout@v4
5046 uses : shivammathur/setup-php@v2
5147 with :
5248 php-version : ${{ matrix.php-version }}
53- extensions : ast, ${{ env.PHP_EXTENSIONS }}
49+ extensions : ${{ env.PHP_EXTENSIONS }}
5450 ini-values : ${{ env.PHP_INI_VALUES }}
5551 coverage : none
5652
6056 - name : " Install dependencies with composer"
6157 uses : ramsey/composer-install@v3
6258
63- - name : " Run phan "
64- run : php vendor/bin/phan --target-php-version=${{ matrix.php-version }}
59+ - name : " Run PHPStan "
60+ run : php vendor/bin/phpstan
6561
6662
6763 tests :
Original file line number Diff line number Diff line change @@ -18,3 +18,4 @@ phpcs.xml
1818phpdoc.xml
1919phpmd.xml
2020phpunit.xml
21+ phpstan.neon
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ A template/boilerplate for PHP libraries (similar to [chillerlan/php-library-tem
2929- [ GitHub Actions] ( https://github.com/chillerlan/php-library-template-nodocs/actions ) runner
3030- [ Composer] ( https://getcomposer.org ) dependency management
3131- [ PHPUnit] ( https://phpunit.de ) unit tests
32- - [ PHAN ] ( https://github.com/phan/phan ) static analysis
32+ - [ PHPStan ] ( https://github.com/phpstan/phpstan ) static analysis
3333- [ PHPCS] ( https://github.com/PHPCSStandards/PHP_CodeSniffer ) coding standard analyzer
3434- [ PHPMD] ( https://phpmd.org ) mess detector
3535- [ Codecov] ( https://codecov.io ) code coverage analysis
Original file line number Diff line number Diff line change 3333 "php" : " ^8.1"
3434 },
3535 "require-dev" : {
36- "phan/phan" : " ^5.4" ,
3736 "phpunit/phpunit" : " ^10.5" ,
3837 "phpmd/phpmd" : " ^2.15" ,
39- "squizlabs/php_codesniffer" : " ^3.9"
38+ "phpstan/phpstan" : " ^1.11" ,
39+ "phpstan/phpstan-deprecation-rules" : " ^1.2" ,
40+ "squizlabs/php_codesniffer" : " ^3.10"
4041 },
4142 "suggest" : {
4243 },
5152 }
5253 },
5354 "scripts" : {
54- "phan" : " @php vendor/bin/phan" ,
5555 "phpcs" : " @php vendor/bin/phpcs" ,
56- "phpunit" : " @php vendor/bin/phpunit"
56+ "phpunit" : " @php vendor/bin/phpunit" ,
57+ "phpstan" : " @php vendor/bin/phpstan"
5758 },
5859 "config" : {
5960 "lock" : false ,
Original file line number Diff line number Diff line change 1+ parameters :
2+ ignoreErrors : []
Original file line number Diff line number Diff line change 1+ # https://phpstan.org/config-reference
2+
3+ parameters :
4+ level : 9
5+ tmpDir : .build/phpstan-cache
6+ paths :
7+ - examples
8+ - src
9+ - tests
10+
11+ treatPhpDocTypesAsCertain : false
12+
13+ includes :
14+ - phpstan-baseline.neon
15+ - vendor/phpstan/phpstan/conf/bleedingEdge.neon
16+ - vendor/phpstan/phpstan-deprecation-rules/rules.neon
17+ # - vendor/chillerlan/php-settings-container/rules-magic-access.neon
You can’t perform that action at this time.
0 commit comments