Skip to content

Commit 5e22288

Browse files
authored
Merge pull request #86 from Kit/use-phpstan-2.0
Tests: Use PHPStan 2.0
2 parents cf6584f + b2b099d commit 5e22288

3 files changed

Lines changed: 17 additions & 3 deletions

File tree

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@
2121
"codeception/util-universalframework": "^1.0",
2222
"php-webdriver/webdriver": "<=1.14.0",
2323
"wp-coding-standards/wpcs": "^3.0.0",
24-
"phpstan/phpstan": "^1.7",
25-
"szepeviktor/phpstan-wordpress": "^1.0",
26-
"wp-cli/wp-cli": "2.8.1"
24+
"phpstan/phpstan": "^1.0 || ^2.0",
25+
"szepeviktor/phpstan-wordpress": "^1.0 || ^2.0",
26+
"wp-cli/wp-cli": "2.11"
2727
},
2828
"minimum-stability": "stable",
2929
"config": {

phpstan.neon.dist

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,13 @@ parameters:
1818
scanDirectories:
1919
- /home/runner/work/convertkit-wordpress-libraries/convertkit-wordpress-libraries/wordpress/wp-content/plugins
2020

21+
# Location of constants for PHPStan to scan, building symbols.
22+
scanFiles:
23+
- /home/runner/work/convertkit-wordpress-libraries/convertkit-wordpress-libraries/wordpress/wp-config.php
24+
25+
# Don't report unmatched ignored errors on older PHP versions (7.2, 7.3)
26+
reportUnmatchedIgnoredErrors: false
27+
2128
# Should not need to edit anything below here
2229
# Rule Level: https://phpstan.org/user-guide/rule-levels
2330
level: 5

phpstan.neon.example

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,13 @@ parameters:
1818
scanDirectories:
1919
- /Users/tim/Local Sites/convertkit-github/app/public/wp-content/plugins
2020

21+
# Location of constants for PHPStan to scan, building symbols.
22+
scanFiles:
23+
- /Users/tim/Local Sites/convertkit-github/app/public/wp-config.php
24+
25+
# Don't report unmatched ignored errors on older PHP versions (7.2, 7.3)
26+
reportUnmatchedIgnoredErrors: false
27+
2128
# Should not need to edit anything below here
2229
# Rule Level: https://phpstan.org/user-guide/rule-levels
2330
level: 5

0 commit comments

Comments
 (0)