diff --git a/CHANGELOG.md b/CHANGELOG.md index 25e6adbe0af6e1c0e1e4e7d437285ec2aa647357..29cfee57618b84ca566847c1bb90173c99bd2595 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## [1.2.7] - 2023-08-28 +### Changed +- Updated WPCS upstream version to 3.0 + ## [1.2.6] - 2023-05-30 ### Fixed - Changed excluded ruleset reference according to upstream update diff --git a/WPDeskPlugin/ruleset.xml b/WPDeskPlugin/ruleset.xml index 9a99fedb5aad424e3e071565f5ac95717fefca67..0c575301875efb6bf6faac2b6ef242eb0875a295 100644 --- a/WPDeskPlugin/ruleset.xml +++ b/WPDeskPlugin/ruleset.xml @@ -21,11 +21,11 @@ <exclude name="WordPress.Files.FileName"/> <!-- WPCS demands long arrays. WPDeskCS demands short arrays. --> - <exclude name="Generic.Arrays.DisallowShortArraySyntax"/> + <exclude name="Universal.Arrays.DisallowShortArraySyntax"/> <!-- Demanding Yoda conditions is stupid. --> <exclude name="WordPress.PHP.YodaConditions"/> - + <!-- The only required comments are for the classes. --> <exclude name="Squiz.Commenting.FunctionComment"/> <exclude name="Generic.Commenting.DocComment.MissingShort"/> @@ -96,9 +96,6 @@ These may make it into WPCS at some point. If so, they can be removed here. ############################################################################# --> - <!-- CS: no blank line between the content of a function and a function close brace.--> - <rule ref="PSR2.Methods.FunctionClosingBrace"/> - <!-- CS: ensure exactly one blank line before each property declaration. --> <rule ref="Squiz.WhiteSpace.MemberVarSpacing"/> @@ -112,27 +109,6 @@ </properties> </rule> - <!-- Error prevention: Ensure no git conflicts make it into the code base. --> - <!-- PHPCS 3.4.0: This sniff will be added to WPCS in due time and can then be removed from this ruleset. - Related: https://github.com/WordPress/WordPress-Coding-Standards/issues/1500 --> - <rule ref="Generic.VersionControl.GitMergeConflict"/> - - <!-- CS: no space between an increment/decrement operator and the variable it applies to. --> - <!-- PHPCS 3.4.0: This sniff will be added to WPCS in due time and can then be removed from this ruleset. - Related: https://github.com/WordPress/WordPress-Coding-Standards/issues/1511 --> - <rule ref="Generic.WhiteSpace.IncrementDecrementSpacing"/> - - <!-- QA: Function declarations should not contain parameters which will never be used. --> - <!-- PHPCS 3.4.0: This sniff will be added to WPCS in due time and can then be removed from this ruleset. - Related: https://github.com/WordPress/WordPress-Coding-Standards/issues/1510 --> - <rule ref="Generic.CodeAnalysis.UnusedFunctionParameter.Found"/> - <rule ref="Generic.CodeAnalysis.UnusedFunctionParameter.FoundAfterLastUsed"/> - - <!-- CS: Ensure consistent whitespace around spread operators. --> - <!-- PHPCS 3.5.0: This sniff will be added to WPCS in due time and can then be removed from this ruleset. - Related: https://github.com/WordPress/WordPress-Coding-Standards/issues/1762 --> - <rule ref="Generic.WhiteSpace.SpreadOperatorSpacingAfter"/> - <!-- CS: Disallow a leading backslash at the start of an import use statement. --> <!-- PHPCS 3.5.0: This sniff may be added to WPCS in due time and can then be removed from this ruleset. --> <rule ref="PSR12.Files.ImportStatement"/> diff --git a/composer.json b/composer.json index 8deae0542cb4357e809386debd207c8b5e2f75ee..9d7bb88628eb5cf23a6629a629ded6e4336a75af 100644 --- a/composer.json +++ b/composer.json @@ -14,9 +14,8 @@ ], "require": { "php": ">=7.0", - "dealerdirect/phpcodesniffer-composer-installer": "^1", "squizlabs/php_codesniffer": "^3.6", - "wp-coding-standards/wpcs": "dev-develop as 2.4.x-dev", + "wp-coding-standards/wpcs": "^3", "phpcompatibility/phpcompatibility-wp": "^2.1.1" }, "require-dev": { diff --git a/phpcs.xml.dist b/phpcs.xml.dist index 601f1d76b84375b40560545a9fbc4d9faf8d3060..90ede1d383a5703aa42663cd89e54012c2ac9bde 100644 --- a/phpcs.xml.dist +++ b/phpcs.xml.dist @@ -34,10 +34,10 @@ <config name="text_domain" value="enter-plugin-text-domain-here"/> <!-- This value should be aligned with WordPress support version declared in plugin header --> - <config name="minimum_supported_wp_version" value="5.0"/> + <config name="minimum_wp_version" value="5.5"/> <!-- Set value aligned with supported PHP Version for PHPCompatibilityWP check. --> - <config name="testVersion" value="7.0-"/> + <config name="testVersion" value="7.2-"/> <rule ref="WPDeskPlugin"/>