Skip to content

Commit 4a74356

Browse files
committed
:octocat: code analysis update
1 parent a500fea commit 4a74356

16 files changed

+403
-127
lines changed

.gitattributes

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,21 @@
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

.github/workflows/ci.yml

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,6 @@ jobs:
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
@@ -50,18 +46,18 @@ jobs:
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

57-
# - name: "Validate composer.json"
58-
# run: composer validate --ansi --strict
59-
6053
- name: "Install dependencies with composer"
6154
uses: ramsey/composer-install@v3
6255

63-
- name: "Run phan"
64-
run: php vendor/bin/phan --target-php-version=${{ matrix.php-version }}
56+
- name: "Run PHPStan"
57+
run: php vendor/bin/phpstan
58+
59+
- name: "Run PHP_CodeSniffer"
60+
run: php vendor/bin/phpcs
6561

6662

6763
tests:
@@ -79,6 +75,7 @@ jobs:
7975
- "8.1"
8076
- "8.2"
8177
- "8.3"
78+
- "8.4"
8279

8380
steps:
8481
- name: "Checkout"

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,4 @@ phpdoc.xml
1919
phpmd.xml
2020
phpunit.xml
2121
*cacert.pem
22+
phpstan.neon

.phan/config.php

Lines changed: 0 additions & 61 deletions
This file was deleted.

composer.json

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,30 +26,38 @@
2626
"php": "^8.1"
2727
},
2828
"require-dev": {
29-
"phpunit/phpunit": "^10.5",
30-
"phan/phan": "^5.4",
3129
"chillerlan/php-httpinterface": "^6.0",
32-
"guzzlehttp/guzzle": "^7.8"
30+
"guzzlehttp/guzzle": "^7.9",
31+
"phpstan/phpstan": "^1.11",
32+
"phpstan/phpstan-deprecation-rules": "^1.2",
33+
"phpunit/phpunit": "^10.5",
34+
"slevomat/coding-standard": "^8.15",
35+
"squizlabs/php_codesniffer": "^3.10"
3336
},
3437
"suggest": {
3538
},
3639
"autoload": {
3740
"psr-4": {
38-
"chillerlan\\PHPUnitHttp\\": "src/"
41+
"chillerlan\\PHPUnitHttp\\": "src"
3942
}
4043
},
4144
"autoload-dev": {
4245
"psr-4": {
43-
"chillerlan\\PHPUnitHttpTest\\": "tests/"
46+
"chillerlan\\PHPUnitHttpTest\\": "tests"
4447
}
4548
},
4649
"scripts": {
47-
"phpunit": "@php vendor/bin/phpunit",
48-
"phan": "@php vendor/bin/phan"
50+
"phpcs": "@php vendor/bin/phpcs",
51+
"phpstan": "@php vendor/bin/phpstan",
52+
"phpstan-baseline": "@php vendor/bin/phpstan --generate-baseline",
53+
"phpunit": "@php vendor/bin/phpunit"
4954
},
5055
"config": {
5156
"lock": false,
5257
"sort-packages": true,
53-
"platform-check": true
58+
"platform-check": true,
59+
"allow-plugins": {
60+
"dealerdirect/phpcodesniffer-composer-installer": true
61+
}
5462
}
5563
}

0 commit comments

Comments
 (0)