Skip to content

Commit 4d78ea8

Browse files
committed
chore: update wpcs/vipcs to v3.0
1 parent b2973c1 commit 4d78ea8

File tree

4 files changed

+9
-8
lines changed

4 files changed

+9
-8
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,6 @@ The best way to use these sniffs in your project is to create a [local configura
5252
In this file, you will want to configure the following:
5353

5454
- [`testVersion`](./phpcs.xml.dist.example#L33) - The minimum PHP version you want to test against. This should be the lowest version of PHP that you want to support. While WPGraphQL officially supports PHP 7.1+, we recommend testing against PHP 7.3 (the current lowest version actively [tested against](https://github.com/wp-graphql/wp-graphql/blob/develop/.github/workflows/testing-integration.yml)) or higher.
55-
- [`minimum_supported_wp_version`](./phpcs.xml.dist.example#L43) - The minimum WordPress version you want to test against. This should be the lowest version of WordPress that you want to support. While WPGraphQL officially supports WordPress 5.0+, we recommend testing against WordPress 5.6 (the current lowest version actively [tested against](https://github.com/wp-graphql/wp-graphql/blob/develop/.github/workflows/testing-integration.yml)) or higher.
55+
- [`minimum_wp_version`](./phpcs.xml.dist.example#L43) - The minimum WordPress version you want to test against. This should be the lowest version of WordPress that you want to support. While WPGraphQL officially supports WordPress 5.0+, we recommend testing against WordPress 5.6 (the current lowest version actively [tested against](https://github.com/wp-graphql/wp-graphql/blob/develop/.github/workflows/testing-integration.yml)) or higher.
5656
- [`WordPress.WP.I18n.text_domain`](./phpcs.xml.dist.example#L63) - The text domain used in your project. This is used by the `WordPress.WP.I18n` sniff to check that all translatable strings are assigned to a text domain. We recommend using the format `wp-graphql-<project-name>`.
5757
- [`WordPress.NamingConventions.PrefixAllGlobals`](./phpcs.xml.dist.example#L57) - The list of prefixes used in your project. This is used by the `WordPress.NamingConventions.PrefixAllGlobals` sniff to check that all global functions, classes, constants, and variables are prefixed.

WPGraphQL-Minimum/ruleset.xml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,23 @@
1616

1717
<rule ref="WordPress">
1818
<!-- Definitely should not be added back -->
19-
<exclude name="Generic.Arrays.DisallowShortArraySyntax"/>
20-
<exclude name="WordPress.CodeAnalysis.AssignmentInCondition.Found"/>
19+
<exclude name="Generic.CodeAnalysis.AssignmentInCondition.Found"/>
20+
<exclude name="Universal.Arrays.DisallowShortArraySyntax"/>
21+
<exclude name="Universal.Operators.DisallowShortTernary.Found"/>
2122
<exclude name="WordPress.Files.FileName"/>
2223
<exclude name="WordPress.NamingConventions.ValidVariableName"/>
23-
<exclude name="WordPress.PHP.DisallowShortTernary.Found"/>
2424

2525
<!-- Should probably not be added back -->
2626
<exclude name="PHPCompatibility.Keywords.ForbiddenNamesAsDeclared.objectFound"/>
2727
<exclude name="WordPress.NamingConventions.ValidHookName.UseUnderscores"/>
2828

2929
<!-- Added back in WPGraphQL-Strict -->
30+
<exclude name="Generic.CodeAnalysis.UnusedFunctionParameter" />
3031
<exclude name="PEAR.Functions.FunctionCallSignature.CloseBracketLine"/>
3132
<exclude name="PEAR.Functions.FunctionCallSignature.ContentAfterOpenBracket"/>
3233
<exclude name="PEAR.Functions.FunctionCallSignature.MultipleArguments"/>
34+
<exclude name="WordPress.WP.Capabilities.Undetermined" />
35+
3336
<!-- This would be a breaking change to fix in Core -->
3437
<exclude name="WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid"/>
3538
</rule>

composer.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,8 @@
2525
],
2626
"require": {
2727
"php": ">=7.2",
28-
"dealerdirect/phpcodesniffer-composer-installer": "^0.6.2 || ^0.7 || ^1.0",
29-
"squizlabs/php_codesniffer": "^3.7.1",
3028
"slevomat/coding-standard": "^8.12",
31-
"automattic/vipwpcs": "^2.3",
29+
"automattic/vipwpcs": "^3.0",
3230
"phpcompatibility/phpcompatibility-wp": "^2.1"
3331
},
3432
"require-dev": {

phpcs.xml.dist.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
Tests for WordPress version compatibility.
4444
https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/wiki/Customizable-sniff-properties
4545
-->
46-
<config name="minimum_supported_wp_version" value="5.9"/>
46+
<config name="minimum_wp_version" value="5.9"/>
4747

4848
<!-- Rules: WPGraphQL Coding Standards -->
4949
<!-- https://github.com/AxeWP/WPGraphQL-Coding-Standards/WPGraphQL/ruleset.xml -->

0 commit comments

Comments
 (0)