Skip to content

Commit f322839

Browse files
authored
Merge pull request #67 from wp-cli/dependabot/composer/wp-cli/wp-cli-tests-tw-5
2 parents b251dfc + 4f44c1d commit f322839

File tree

3 files changed

+22
-3
lines changed

3 files changed

+22
-3
lines changed

composer.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,15 @@
88
"wp-cli/wp-cli": "^2"
99
},
1010
"require-dev": {
11-
"wp-cli/wp-cli-tests": "^4"
11+
"wp-cli/wp-cli-tests": "^5"
1212
},
1313
"config": {
1414
"process-timeout": 7200,
1515
"sort-packages": true,
1616
"allow-plugins": {
1717
"dealerdirect/phpcodesniffer-composer-installer": true,
18-
"johnpbloch/wordpress-core-installer": true
18+
"johnpbloch/wordpress-core-installer": true,
19+
"phpstan/extension-installer": true
1920
},
2021
"lock": false
2122
},
@@ -39,12 +40,14 @@
3940
"behat-rerun": "rerun-behat-tests",
4041
"lint": "run-linter-tests",
4142
"phpcs": "run-phpcs-tests",
43+
"phpstan": "run-phpstan-tests",
4244
"phpcbf": "run-phpcbf-cleanup",
4345
"phpunit": "run-php-unit-tests",
4446
"prepare-tests": "install-package-tests",
4547
"test": [
4648
"@lint",
4749
"@phpcs",
50+
"@phpstan",
4851
"@phpunit",
4952
"@behat"
5053
]

phpcs.xml.dist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838

3939
<!-- For help understanding the `testVersion` configuration setting:
4040
https://github.com/PHPCompatibility/PHPCompatibility#sniffing-your-code-for-compatibility-with-specific-php-versions -->
41-
<config name="testVersion" value="5.6-"/>
41+
<config name="testVersion" value="7.2-"/>
4242

4343
<!-- Make this sniff slightly less finicky. The WP Core default is 40. -->
4444
<rule ref="Generic.Formatting.MultipleStatementAlignment">

phpstan.neon.dist

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
parameters:
2+
level: 9
3+
paths:
4+
- admin-command.php
5+
scanFiles:
6+
- vendor/php-stubs/wordpress-stubs/wordpress-stubs.php
7+
treatPhpDocTypesAsCertain: false
8+
strictRules:
9+
uselessCast: true
10+
closureUsesThis: true
11+
overwriteVariablesWithLoop: true
12+
matchingInheritedMethodNames: true
13+
numericOperandsInArithmeticOperators: true
14+
switchConditionsMatchingType: true
15+
ignoreErrors:
16+
- identifier: missingType.return

0 commit comments

Comments
 (0)