Skip to content

Commit d0de432

Browse files
committed
feat: add PHPStan extensions
- detect deprecated functions - check PHPUnit
1 parent bb8e894 commit d0de432

File tree

2 files changed

+17
-4
lines changed

2 files changed

+17
-4
lines changed

composer.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,13 @@
4242
"ext-gmp": "Optional for performance."
4343
},
4444
"require-dev": {
45-
"phpunit/phpunit": "^11.5.46|^12.5.2",
46-
"phpstan/phpstan": "^2.1.33",
4745
"friendsofphp/php-cs-fixer": "^v3.92.2",
48-
"symfony/polyfill-iconv": "^1.33",
49-
"phpstan/phpstan-strict-rules": "^2.0"
46+
"phpstan/phpstan": "^2.1.33",
47+
"phpstan/phpstan-deprecation-rules": "^2.0",
48+
"phpstan/phpstan-phpunit": "^2.0",
49+
"phpstan/phpstan-strict-rules": "^2.0",
50+
"phpunit/phpunit": "^11.5.46|^12.5.2",
51+
"symfony/polyfill-iconv": "^1.33"
5052
},
5153
"autoload": {
5254
"psr-4": {

phpstan.neon

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,20 @@ parameters:
55
reportUnmatchedIgnoredErrors: false
66
ignoreErrors:
77
- identifier: missingType.iterableValue
8+
paths:
9+
- src/Encryption.php
10+
- src/MessageSentReport.php
11+
- src/Notification.php
12+
- src/Subscription.php
13+
- src/Utils.php
14+
- src/VAPID.php
15+
- src/WebPush.php
816
strictRules:
917
booleansInConditions: false
1018
disallowedEmpty: false
1119

1220
includes:
21+
- vendor/phpstan/phpstan-deprecation-rules/rules.neon
22+
- vendor/phpstan/phpstan-phpunit/extension.neon
23+
- vendor/phpstan/phpstan-phpunit/rules.neon
1324
- vendor/phpstan/phpstan-strict-rules/rules.neon

0 commit comments

Comments
 (0)