diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 8990d1a7b1..9183ad9a06 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -39,9 +39,9 @@ When you introduce new `public` sniff properties, or your sniff extends a class ## Pre-requisites * WordPress-Coding-Standards -* PHP_CodeSniffer 3.9.0 or higher -* PHPCSUtils 1.0.10 or higher -* PHPCSExtra 1.2.1 or higher +* PHP_CodeSniffer 3.13.0 or higher +* PHPCSUtils 1.1.0 or higher +* PHPCSExtra 1.4.0 or higher * PHPUnit 4.x - 9.x The WordPress Coding Standards use the `PHP_CodeSniffer` native unit test framework for unit testing the sniffs. diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 6e96e7d545..87b871363e 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -75,7 +75,7 @@ jobs: # Add extra build to test against PHPCS 4. #- php: '7.4' - # dependencies: '4.0.x-dev as 3.9.99' + # dependencies: '4.0.x-dev as 3.99.99' name: PHP ${{ matrix.php }} on PHPCS ${{ matrix.dependencies }} diff --git a/WordPress/Tests/NamingConventions/ValidVariableNameUnitTest.inc b/WordPress/Tests/NamingConventions/ValidVariableNameUnitTest.inc index 437c005899..a8cac33a54 100644 --- a/WordPress/Tests/NamingConventions/ValidVariableNameUnitTest.inc +++ b/WordPress/Tests/NamingConventions/ValidVariableNameUnitTest.inc @@ -189,7 +189,7 @@ class MultiVarDeclarations { echo "This is $post_ID with $ThisShouldBeFlagged"; // Bad. -// Safeguard that illegal property declarations are ignored. +// Properties in interfaces are allowed since PHP 8.4. interface PropertiesNotAllowed { public $notAllowed; } diff --git a/WordPress/Tests/NamingConventions/ValidVariableNameUnitTest.php b/WordPress/Tests/NamingConventions/ValidVariableNameUnitTest.php index c26a4936e7..68b2b64a5c 100644 --- a/WordPress/Tests/NamingConventions/ValidVariableNameUnitTest.php +++ b/WordPress/Tests/NamingConventions/ValidVariableNameUnitTest.php @@ -84,6 +84,7 @@ public function getErrorList() { 184 => 1, 186 => 1, 190 => 1, + 194 => 1, 199 => 1, 200 => 1, 202 => 1, diff --git a/composer.json b/composer.json index fa03b88193..a952c86541 100644 --- a/composer.json +++ b/composer.json @@ -21,9 +21,9 @@ "ext-libxml": "*", "ext-tokenizer": "*", "ext-xmlreader": "*", - "squizlabs/php_codesniffer": "^3.9.0", - "phpcsstandards/phpcsutils": "^1.0.10", - "phpcsstandards/phpcsextra": "^1.2.1" + "squizlabs/php_codesniffer": "^3.13.0", + "phpcsstandards/phpcsutils": "^1.1.0", + "phpcsstandards/phpcsextra": "^1.4.0" }, "require-dev": { "phpcompatibility/php-compatibility": "^9.0",