File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1212 "php" : " >=7.2.24" ,
1313 "behat/behat" : " ^v3.15.0" ,
1414 "dealerdirect/phpcodesniffer-composer-installer" : " ^0.4.3 || ^0.5 || ^0.6.2 || ^0.7.1 || ^1.0.0" ,
15+ "johnbillion/wp-compat" : " ^2.0" ,
1516 "php-parallel-lint/php-console-highlighter" : " ^1.0" ,
1617 "php-parallel-lint/php-parallel-lint" : " ^1.3.1" ,
1718 "phpcompatibility/php-compatibility" : " ^10.0" ,
Original file line number Diff line number Diff line change @@ -29,6 +29,10 @@ rules:
2929parameters :
3030 dynamicConstantNames :
3131 - FOO
32+ WPCompat :
33+ pluginFile : null
34+ # Oldest WordPress version supported by WP-CLI.
35+ requiresAtLeast : ' 4.9'
3236 strictRules :
3337 allRules : false
3438 disallowedLooseComparison : false
@@ -53,9 +57,13 @@ parameters:
5357 dynamicCallOnStaticMethod : false
5458 illegalConstructorMethodCall : false
5559
56- # Add the schema from phpstan-strict-rules so it's available without loading the extension
57- # and the above configuration works.
60+ # Add the schemas from phpstan-strict-rules and wp-compat so they're available without
61+ # loading the extensions and the above configuration works.
5862parametersSchema :
63+ WPCompat : structure ([
64+ pluginFile : schema (string (), nullable ())
65+ requiresAtLeast : schema (string (), nullable ())
66+ ])
5967 strictRules : structure ([
6068 allRules : anyOf (bool (), arrayOf (bool ())),
6169 disallowedLooseComparison : anyOf (bool (), arrayOf (bool ())),
You can’t perform that action at this time.
0 commit comments