File tree 8 files changed +48
-90
lines changed
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
18
20
19
21
* .php diff =php
Original file line number Diff line number Diff line change 38
38
- " 8.2"
39
39
- " 8.3"
40
40
41
- env :
42
- PHAN_ALLOW_XDEBUG : 0
43
- PHAN_DISABLE_XDEBUG_WARN : 1
44
-
45
41
steps :
46
42
- name : " Checkout"
47
43
uses : actions/checkout@v4
50
46
uses : shivammathur/setup-php@v2
51
47
with :
52
48
php-version : ${{ matrix.php-version }}
53
- extensions : ast, ${{ env.PHP_EXTENSIONS }}
49
+ extensions : ${{ env.PHP_EXTENSIONS }}
54
50
ini-values : ${{ env.PHP_INI_VALUES }}
55
51
coverage : none
56
52
60
56
- name : " Install dependencies with composer"
61
57
uses : ramsey/composer-install@v3
62
58
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
65
61
66
62
67
63
tests :
Original file line number Diff line number Diff line change @@ -18,3 +18,4 @@ phpcs.xml
18
18
phpdoc.xml
19
19
phpmd.xml
20
20
phpunit.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
29
29
- [ GitHub Actions] ( https://github.com/chillerlan/php-library-template-nodocs/actions ) runner
30
30
- [ Composer] ( https://getcomposer.org ) dependency management
31
31
- [ PHPUnit] ( https://phpunit.de ) unit tests
32
- - [ PHAN ] ( https://github.com/phan/phan ) static analysis
32
+ - [ PHPStan ] ( https://github.com/phpstan/phpstan ) static analysis
33
33
- [ PHPCS] ( https://github.com/PHPCSStandards/PHP_CodeSniffer ) coding standard analyzer
34
34
- [ PHPMD] ( https://phpmd.org ) mess detector
35
35
- [ Codecov] ( https://codecov.io ) code coverage analysis
Original file line number Diff line number Diff line change 33
33
"php" : " ^8.1"
34
34
},
35
35
"require-dev" : {
36
- "phan/phan" : " ^5.4" ,
37
36
"phpunit/phpunit" : " ^10.5" ,
38
37
"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"
40
41
},
41
42
"suggest" : {
42
43
},
51
52
}
52
53
},
53
54
"scripts" : {
54
- "phan" : " @php vendor/bin/phan" ,
55
55
"phpcs" : " @php vendor/bin/phpcs" ,
56
- "phpunit" : " @php vendor/bin/phpunit"
56
+ "phpunit" : " @php vendor/bin/phpunit" ,
57
+ "phpstan" : " @php vendor/bin/phpstan"
57
58
},
58
59
"config" : {
59
60
"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