Skip to content

Commit 48e59e9

Browse files
authored
Composer: raise the minimum supported PHPCSUtils version to 1.1.0 + fix CI (#2532)
* Composer: raise the minimum supported PHPCSUtils version to 1.1.0 to benefit from new functionality. This also automatically raises the minimum PHPCS version to `3.13.0` for PHP 8.2 DNF type support and tokenizer support for PHP 8.4 `final` properties and asymmetric visibility. Includes syncing the PHPCSExtra version to a version which also has a minimum PHPCSUtils version of 1.1.0. Ref: * https://github.com/PHPCSStandards/PHPCSUtils/releases/tag/1.1.0 * https://github.com/PHPCSStandards/PHPCSExtra/releases/tag/1.4.0 * NamingConventions/ValidVariableName: allow for PHP 8.4 properties in interfaces
1 parent 16b9992 commit 48e59e9

File tree

5 files changed

+9
-8
lines changed

5 files changed

+9
-8
lines changed

.github/CONTRIBUTING.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ When you introduce new `public` sniff properties, or your sniff extends a class
3939

4040
## Pre-requisites
4141
* WordPress-Coding-Standards
42-
* PHP_CodeSniffer 3.9.0 or higher
43-
* PHPCSUtils 1.0.10 or higher
44-
* PHPCSExtra 1.2.1 or higher
42+
* PHP_CodeSniffer 3.13.0 or higher
43+
* PHPCSUtils 1.1.0 or higher
44+
* PHPCSExtra 1.4.0 or higher
4545
* PHPUnit 4.x - 9.x
4646

4747
The WordPress Coding Standards use the `PHP_CodeSniffer` native unit test framework for unit testing the sniffs.

.github/workflows/unit-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ jobs:
7575

7676
# Add extra build to test against PHPCS 4.
7777
#- php: '7.4'
78-
# dependencies: '4.0.x-dev as 3.9.99'
78+
# dependencies: '4.0.x-dev as 3.99.99'
7979

8080
name: PHP ${{ matrix.php }} on PHPCS ${{ matrix.dependencies }}
8181

WordPress/Tests/NamingConventions/ValidVariableNameUnitTest.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ class MultiVarDeclarations {
189189

190190
echo "This is $post_ID with $ThisShouldBeFlagged"; // Bad.
191191

192-
// Safeguard that illegal property declarations are ignored.
192+
// Properties in interfaces are allowed since PHP 8.4.
193193
interface PropertiesNotAllowed {
194194
public $notAllowed;
195195
}

WordPress/Tests/NamingConventions/ValidVariableNameUnitTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ public function getErrorList() {
8484
184 => 1,
8585
186 => 1,
8686
190 => 1,
87+
194 => 1,
8788
199 => 1,
8889
200 => 1,
8990
202 => 1,

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@
2121
"ext-libxml": "*",
2222
"ext-tokenizer": "*",
2323
"ext-xmlreader": "*",
24-
"squizlabs/php_codesniffer": "^3.9.0",
25-
"phpcsstandards/phpcsutils": "^1.0.10",
26-
"phpcsstandards/phpcsextra": "^1.2.1"
24+
"squizlabs/php_codesniffer": "^3.13.0",
25+
"phpcsstandards/phpcsutils": "^1.1.0",
26+
"phpcsstandards/phpcsextra": "^1.4.0"
2727
},
2828
"require-dev": {
2929
"phpcompatibility/php-compatibility": "^9.0",

0 commit comments

Comments
 (0)