File tree Expand file tree Collapse file tree 8 files changed +50
-92
lines changed Expand file tree Collapse file tree 8 files changed +50
-92
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 @@ -32,7 +32,7 @@ A template/boilerplate for PHP libraries.
3232- [ GitHub Actions] ( https://github.com/chillerlan/php-library-template/actions ) runner
3333- [ Composer] ( https://getcomposer.org ) dependency management
3434- [ PHPUnit] ( https://phpunit.de ) unit tests
35- - [ PHAN ] ( https://github.com/phan/phan ) static analysis
35+ - [ PHPStan ] ( https://github.com/phpstan/phpstan ) static analysis
3636- [ PHPCS] ( https://github.com/PHPCSStandards/PHP_CodeSniffer ) coding standard analyzer
3737- [ PHPMD] ( https://phpmd.org ) mess detector
3838- [ Codecov] ( https://codecov.io ) code coverage analysis
Original file line number Diff line number Diff line change 3434 "php" : " ^8.1"
3535 },
3636 "require-dev" : {
37- "phan/phan" : " ^5.4" ,
3837 "phpunit/phpunit" : " ^10.5" ,
3938 "phpmd/phpmd" : " ^2.15" ,
40- "squizlabs/php_codesniffer" : " ^3.9"
39+ "phpstan/phpstan" : " ^1.11" ,
40+ "phpstan/phpstan-deprecation-rules" : " ^1.2" ,
41+ "squizlabs/php_codesniffer" : " ^3.10"
4142 },
4243 "suggest" : {
4344 },
4445 "autoload" : {
4546 "psr-4" : {
46- "chillerlan\\ LibraryTemplate\\ " : " src/ "
47+ "chillerlan\\ LibraryTemplate\\ " : " src"
4748 }
4849 },
4950 "autoload-dev" : {
5051 "psr-4" : {
51- "chillerlan\\ LibraryTemplateTest\\ " : " tests/ "
52+ "chillerlan\\ LibraryTemplateTest\\ " : " tests"
5253 }
5354 },
5455 "scripts" : {
55- "phan" : " @php vendor/bin/phan" ,
5656 "phpcs" : " @php vendor/bin/phpcs" ,
57- "phpunit" : " @php vendor/bin/phpunit"
57+ "phpunit" : " @php vendor/bin/phpunit" ,
58+ "phpstan" : " @php vendor/bin/phpstan"
5859 },
5960 "config" : {
6061 "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