Releases: AxeWP/WPGraphQL-Coding-Standards
v2.0.0 - 2025-02-15
This release marks the first stable
release of the WPGraphQL Coding Standards. 🎉🎉
It updates the WPGraphQL-Core
ruleset to match the latest changes included in WPGraphQL v2.0.0.
Note
While this v2.0 release coincides with WPGraphQL v2.0, it's more of a reflection of the stability of the rulesets that these were the only changes needed to WPGraphQL or these rulesets since April 2024.
Future releases will continue to use SemVer, and not necessarily align with WPGraphQL's core version.
What's changed
WPGraphQL-Core
- Added
WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid
. - Added
SlevomatCodingStandard.TypeHints.NullableTypeForNullDefaultValue.NullabilityTypeMissing
.
Full Changelog: 2.0.0-beta.3...2.0.0
2.0.0-beta.3
This release explicitly adds Squiz.WhiteSpace.SuperfluousWhitespace
to the WPGraphQL-Extra
ruleset, as it is silenced by VIPCS.
What's Changed
WPGraphQL-Extra
- Added
Squiz.WhiteSpace.SuperfluousWhitespace
and made explicit.
Full Changelog: 2.0.0-beta.2...2.0.0-beta.3
2.0.0-beta.2
This release updates the ruleset based on the latest changes to WPGraphQL core (v1.18.0). Specifically:
WPGraphQL-Minimum
- Added
PHPCompatibility.Keywords.ForbiddenNamesAsDeclared.objectFound
. - Moved
SlevomatCodingStandard.Classes.RequireSelfReference
fromWPGraphQL-Strict
. - Moved
SlevomatCodingStandard.TypeHints.ReturnTypeHint.LessSpecificNativeTypeHint
fromWPGraphQL-Extra
and made explicit. - Moved
SlevomatCodingStandard.Variables.UselessVariable
fromWPGraphQL-Extra
.
WPGraphQL-Strict
- Moved
SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses
fromWPGraphQL-Extra
. - Added
SlevomatCodingStandard.TypeHints.NullableTypeForNullDefaultValue
. - Added
SlevomatCodingStandard.TypeHints.NullTypeHintOnLastPosition
. - Moved
SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingAnyTypeHint
fromWPGraphQL-Extra
and made explicit. - Moved
SlevomatCodingStandard.TypeHints.PropertyTypeHint.MissingAnyTypeHint
fromWPGraphQL-Extra
and made explicit. - Moved
SlevomatCodingStandard.TypeHints.ReturnTypeHint.MissingAnyTypeHint
fromWPGraphQL-Extra
and made explicit.
WPGraphQL-Docs
- Added
Squiz.Commenting
subset ofWordPress-Docs
. - Added
SlevomatCodingStandard.TypeHints.LongTypeHints
. - Moved
SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingTraversableTypeHintSpecification
fromWPGraphQL-Extra
and made explicit. - Moved
SlevomatCodingStandard.TypeHints.ParameterTypeHint.UselessAnnotation
fromWPGraphQL-Extra
and made explicit. - Moved
SlevomatCodingStandard.TypeHints.ParameterTypeHint.UselessSuppress
fromWPGraphQL-Extra
and made explicit. - Moved
SlevomatCodingStandard.TypeHints.ParameterTypeHintSpacing
fromWPGraphQL-Extra
. - Moved
SlevomatCodingStandard.TypeHints.PropertyTypeHint.MissingTraversableTypeHintSpecification
fromWPGraphQL-Extra
and made explicit. - Moved
SlevomatCodingStandard.TypeHints.PropertyTypeHint.UselessSuppress
fromWPGraphQL-Extra
and made explicit. - Moved
SlevomatCodingStandard.TypeHints.ReturnTypeHint.MissingTraversableTypeHintSpecification
fromWPGraphQL-Extra
and made explicit. - Moved
SlevomatCodingStandard.TypeHints.ReturnTypeHint.UselessAnnotation
fromWPGraphQL-Extra
and made explicit. - Moved
SlevomatCodingStandard.TypeHints.ReturnTypeHint.UselessSuppress
fromWPGraphQL-Extra
and made explicit. - Moved
SlevomatCodingStandard.TypeHints.ReturnTypeHintSpacing
fromWPGraphQL-Extra
.
WPGraphQL-Core
- Added
WPGraphQL-Docs
with some exceptions.
Full Changelog: 2.0.0-beta.1...2.0.0-beta.2
2.0.0-beta.1
This release requires WPCS 3.0.0 or higher. Please read the WordPressCS 3.0 upgrade guide for instructions on how to update your local rulesets and code annotations.
What's Changed
- feat!: Bumped minimum WPCS and VIPCS versions to
3.0.0
. - fix!: Remove unused
WordPress.CodeAnalysis.AssignmentInCondition.Found
exclusion fromWPGraphQL-Minimum
. - feat!: Add
Generic.CodeAnalysis.UnusedFunctionParameter
andWordPress.WP.Capabilities.Undetermined
sniffs toWPGraphQL-Strict
. These sniffs are excluded from theWPGraphQL-Core
standard.
Full Changelog: 1.0.0-beta.4...2.0.0-beta.1
1.0.0-beta.3 - 2023-08-04
What's Changed
- feat!: Move
WordPress.WP.I18n.MissingTranslatorsComment
fromWPGraphQL-Strict
toWPGraphQL-Minimum
. (Added to WPGraphQL in wp-graphql/wp-graphql#2856) - feat!: Move
SlevomatCodingStandard.Functions.StaticClosure
fromWPGraphQL-Strict
toWPGraphQL-Minimum
. (Added to WPGraphQL in wp-graphql/wp-graphql#2855) - chore: Update
slevomat/coding-standard
to8.13.4
. - chore: Update Composer dev-deps.
Full Changelog: 1.0.0-beta.2...1.0.0-beta.3
1.0.0-beta.2 - 2023-06-17
What's changed
- dev: Remove
Squiz.Commenting.FunctionComment.ParamCommentFullStop
andSquiz.Commenting.FunctionComment.EmptyThrows
fromWPGraphQL-Strict
. - dev: Update minimum PHPUnit version to
8.5.0
. - chore: Update
phpcs.xml.dist.example
to set the schema locationcache
andseverity
values, and add additional inline-comments.
1.0.0-beta.1 - 2023-06-05
Initial beta release.
The WPGraphQL-Minimum
ruleset should be considered production-ready.
The other rulesets have been tested extensively against AxePress' suite of WPGraphQL extensions and tools, and will be audited against WPGraphQL core during the beta period.