From 429dae5a010fe7b14e68bfe682a83ea3d3374858 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20Zieli=C5=84ski?= Date: Fri, 5 Sep 2025 11:49:14 +0200 Subject: [PATCH 1/2] Update PHPCS versions to stable ones --- composer.json | 6 +- composer.lock | 186 +++++++++++++++++++++++++++++++++----------------- phpcs.xml | 3 +- 3 files changed, 130 insertions(+), 65 deletions(-) diff --git a/composer.json b/composer.json index ba5366ef7..a047343ba 100644 --- a/composer.json +++ b/composer.json @@ -24,9 +24,9 @@ }, "require-dev": { "yoast/phpunit-polyfills": "2.0.0", - "squizlabs/php_codesniffer": "^3.6", - "phpcompatibility/php-compatibility": "10.x-dev", - "wp-coding-standards/wpcs": "^2.3", + "squizlabs/php_codesniffer": "^3.13.4", + "phpcompatibility/php-compatibility": "^9.3.5", + "wp-coding-standards/wpcs": "^3.2.0", "phpunit/phpunit": "^9.5", "phpstan/phpstan": "^1.0" }, diff --git a/composer.lock b/composer.lock index 02c8be0d6..64a7e8dfc 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "e1a8e75d27e1a13c0c8f38f3acc91f99", + "content-hash": "74c5ce31b6f065c8e4ce0e422c31a2a6", "packages": [], "packages-dev": [ { @@ -240,12 +240,12 @@ "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "f103601b29efebd7ff4a1ca7b3eeea9e3336a2a2" + "reference": "f7c23a43eee861070ab4e88819a4e76a611c7e4f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/f103601b29efebd7ff4a1ca7b3eeea9e3336a2a2", - "reference": "f103601b29efebd7ff4a1ca7b3eeea9e3336a2a2", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/f7c23a43eee861070ab4e88819a4e76a611c7e4f", + "reference": "f7c23a43eee861070ab4e88819a4e76a611c7e4f", "shasum": "" }, "require": { @@ -289,9 +289,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v5.6.1" + "source": "https://github.com/nikic/PHP-Parser/tree/master" }, - "time": "2025-08-13T20:13:15+00:00" + "time": "2025-08-19T18:41:44+00:00" }, { "name": "phar-io/manifest", @@ -414,45 +414,33 @@ }, { "name": "phpcompatibility/php-compatibility", - "version": "dev-develop", + "version": "9.3.5", "source": { "type": "git", "url": "https://github.com/PHPCompatibility/PHPCompatibility.git", - "reference": "07f2dc91fcbd35c6b129f1a48032af23b183e176" + "reference": "9fb324479acf6f39452e0655d2429cc0d3914243" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibility/zipball/07f2dc91fcbd35c6b129f1a48032af23b183e176", - "reference": "07f2dc91fcbd35c6b129f1a48032af23b183e176", + "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibility/zipball/9fb324479acf6f39452e0655d2429cc0d3914243", + "reference": "9fb324479acf6f39452e0655d2429cc0d3914243", "shasum": "" }, "require": { - "php": ">=5.4", - "phpcsstandards/phpcsutils": "^1.1.0", - "squizlabs/php_codesniffer": "^3.13.0" + "php": ">=5.3", + "squizlabs/php_codesniffer": "^2.3 || ^3.0.2" }, - "replace": { - "wimg/php-compatibility": "*" + "conflict": { + "squizlabs/php_codesniffer": "2.6.2" }, "require-dev": { - "php-parallel-lint/php-console-highlighter": "^1.0.0", - "php-parallel-lint/php-parallel-lint": "^1.4.0", - "phpcsstandards/phpcsdevcs": "^1.1.3", - "phpcsstandards/phpcsdevtools": "^1.2.0", - "phpunit/phpunit": "^4.8.36 || ^5.7.21 || ^6.0 || ^7.0 || ^8.0 || ^9.3.4 || ^10.5.32 || ^11.3.3", - "yoast/phpunit-polyfills": "^1.0.5 || ^2.0 || ^3.0" + "phpunit/phpunit": "~4.5 || ^5.0 || ^6.0 || ^7.0" }, "suggest": { + "dealerdirect/phpcodesniffer-composer-installer": "^0.5 || This Composer plugin will sort out the PHPCS 'installed_paths' automatically.", "roave/security-advisories": "dev-master || Helps prevent installing dependencies with known security issues." }, - "default-branch": true, "type": "phpcodesniffer-standard", - "extra": { - "branch-alias": { - "dev-master": "9.x-dev", - "dev-develop": "10.x-dev" - } - }, "notification-url": "https://packagist.org/downloads/", "license": [ "LGPL-3.0-or-later" @@ -474,21 +462,84 @@ } ], "description": "A set of sniffs for PHP_CodeSniffer that checks for PHP cross-version compatibility.", - "homepage": "https://techblog.wimgodden.be/tag/codesniffer/", + "homepage": "http://techblog.wimgodden.be/tag/codesniffer/", "keywords": [ "compatibility", "phpcs", - "standards", - "static analysis" + "standards" ], "support": { "issues": "https://github.com/PHPCompatibility/PHPCompatibility/issues", - "security": "https://github.com/PHPCompatibility/PHPCompatibility/security/policy", "source": "https://github.com/PHPCompatibility/PHPCompatibility" }, + "time": "2019-12-27T09:44:58+00:00" + }, + { + "name": "phpcsstandards/phpcsextra", + "version": "dev-develop", + "source": { + "type": "git", + "url": "https://github.com/PHPCSStandards/PHPCSExtra.git", + "reference": "882b8c947ada27eb002870fe77fee9ce0a454cdb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHPCSStandards/PHPCSExtra/zipball/882b8c947ada27eb002870fe77fee9ce0a454cdb", + "reference": "882b8c947ada27eb002870fe77fee9ce0a454cdb", + "shasum": "" + }, + "require": { + "php": ">=5.4", + "phpcsstandards/phpcsutils": "^1.1.2", + "squizlabs/php_codesniffer": "^3.13.4 || ^4.0" + }, + "require-dev": { + "php-parallel-lint/php-console-highlighter": "^1.0", + "php-parallel-lint/php-parallel-lint": "^1.4.0", + "phpcsstandards/phpcsdevcs": "^1.1.6", + "phpcsstandards/phpcsdevtools": "^1.2.1", + "phpunit/phpunit": "^4.5 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.3.4" + }, + "default-branch": true, + "type": "phpcodesniffer-standard", + "extra": { + "branch-alias": { + "dev-stable": "1.x-dev", + "dev-develop": "1.x-dev" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL-3.0-or-later" + ], + "authors": [ + { + "name": "Juliette Reinders Folmer", + "homepage": "https://github.com/jrfnl", + "role": "lead" + }, + { + "name": "Contributors", + "homepage": "https://github.com/PHPCSStandards/PHPCSExtra/graphs/contributors" + } + ], + "description": "A collection of sniffs and standards for use with PHP_CodeSniffer.", + "keywords": [ + "PHP_CodeSniffer", + "phpcbf", + "phpcodesniffer-standard", + "phpcs", + "standards", + "static analysis" + ], + "support": { + "issues": "https://github.com/PHPCSStandards/PHPCSExtra/issues", + "security": "https://github.com/PHPCSStandards/PHPCSExtra/security/policy", + "source": "https://github.com/PHPCSStandards/PHPCSExtra" + }, "funding": [ { - "url": "https://github.com/PHPCompatibility", + "url": "https://github.com/PHPCSStandards", "type": "github" }, { @@ -500,11 +551,11 @@ "type": "open_collective" }, { - "url": "https://thanks.dev/u/gh/phpcompatibility", + "url": "https://thanks.dev/u/gh/phpcsstandards", "type": "thanks_dev" } ], - "time": "2025-08-18T06:51:15+00:00" + "time": "2025-09-05T06:54:52+00:00" }, { "name": "phpcsstandards/phpcsutils", @@ -512,18 +563,18 @@ "source": { "type": "git", "url": "https://github.com/PHPCSStandards/PHPCSUtils.git", - "reference": "0c759085130ebf1cd7e79334fddf203a4e2d1aae" + "reference": "7f1e3eccb87d731d01341fde07171ab735218c5c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPCSStandards/PHPCSUtils/zipball/0c759085130ebf1cd7e79334fddf203a4e2d1aae", - "reference": "0c759085130ebf1cd7e79334fddf203a4e2d1aae", + "url": "https://api.github.com/repos/PHPCSStandards/PHPCSUtils/zipball/7f1e3eccb87d731d01341fde07171ab735218c5c", + "reference": "7f1e3eccb87d731d01341fde07171ab735218c5c", "shasum": "" }, "require": { "dealerdirect/phpcodesniffer-composer-installer": "^0.4.1 || ^0.5 || ^0.6.2 || ^0.7 || ^1.0", "php": ">=5.4", - "squizlabs/php_codesniffer": "^3.13.0 || ^4.0" + "squizlabs/php_codesniffer": "^3.13.3 || ^4.0" }, "require-dev": { "ext-filter": "*", @@ -598,7 +649,7 @@ "type": "thanks_dev" } ], - "time": "2025-08-18T15:06:24+00:00" + "time": "2025-09-05T05:39:50+00:00" }, { "name": "phpstan/phpstan", @@ -983,12 +1034,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "87d05338fd7df8665184dacaa17250c75aef77d5" + "reference": "dcf66f408d3f1a953a099503455b65e2616f1285" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/87d05338fd7df8665184dacaa17250c75aef77d5", - "reference": "87d05338fd7df8665184dacaa17250c75aef77d5", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/dcf66f408d3f1a953a099503455b65e2616f1285", + "reference": "dcf66f408d3f1a953a099503455b65e2616f1285", "shasum": "" }, "require": { @@ -1086,7 +1137,7 @@ "type": "tidelift" } ], - "time": "2025-08-17T06:07:43+00:00" + "time": "2025-09-03T02:44:36+00:00" }, { "name": "sebastian/cli-parser", @@ -2094,12 +2145,12 @@ "source": { "type": "git", "url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git", - "reference": "38a40fdae10862df09ca2d803f12d1366aab3c2c" + "reference": "8da41e9a9fe4cc14d23cf7fcef3b80476f54e511" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/38a40fdae10862df09ca2d803f12d1366aab3c2c", - "reference": "38a40fdae10862df09ca2d803f12d1366aab3c2c", + "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/8da41e9a9fe4cc14d23cf7fcef3b80476f54e511", + "reference": "8da41e9a9fe4cc14d23cf7fcef3b80476f54e511", "shasum": "" }, "require": { @@ -2171,7 +2222,7 @@ "type": "thanks_dev" } ], - "time": "2025-08-18T15:57:20+00:00" + "time": "2025-09-05T06:01:21+00:00" }, { "name": "theseer/tokenizer", @@ -2225,30 +2276,38 @@ }, { "name": "wp-coding-standards/wpcs", - "version": "2.3.0", + "version": "3.2.0", "source": { "type": "git", "url": "https://github.com/WordPress/WordPress-Coding-Standards.git", - "reference": "7da1894633f168fe244afc6de00d141f27517b62" + "reference": "d2421de7cec3274ae622c22c744de9a62c7925af" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/WordPress/WordPress-Coding-Standards/zipball/7da1894633f168fe244afc6de00d141f27517b62", - "reference": "7da1894633f168fe244afc6de00d141f27517b62", + "url": "https://api.github.com/repos/WordPress/WordPress-Coding-Standards/zipball/d2421de7cec3274ae622c22c744de9a62c7925af", + "reference": "d2421de7cec3274ae622c22c744de9a62c7925af", "shasum": "" }, "require": { + "ext-filter": "*", + "ext-libxml": "*", + "ext-tokenizer": "*", + "ext-xmlreader": "*", "php": ">=5.4", - "squizlabs/php_codesniffer": "^3.3.1" + "phpcsstandards/phpcsextra": "^1.4.0", + "phpcsstandards/phpcsutils": "^1.1.0", + "squizlabs/php_codesniffer": "^3.13.0" }, "require-dev": { - "dealerdirect/phpcodesniffer-composer-installer": "^0.5 || ^0.6", + "php-parallel-lint/php-console-highlighter": "^1.0.0", + "php-parallel-lint/php-parallel-lint": "^1.4.0", "phpcompatibility/php-compatibility": "^9.0", - "phpcsstandards/phpcsdevtools": "^1.0", - "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" + "phpcsstandards/phpcsdevtools": "^1.2.0", + "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.0" }, "suggest": { - "dealerdirect/phpcodesniffer-composer-installer": "^0.6 || This Composer plugin will sort out the PHPCS 'installed_paths' automatically." + "ext-iconv": "For improved results", + "ext-mbstring": "For improved results" }, "type": "phpcodesniffer-standard", "notification-url": "https://packagist.org/downloads/", @@ -2265,6 +2324,7 @@ "keywords": [ "phpcs", "standards", + "static analysis", "wordpress" ], "support": { @@ -2272,7 +2332,13 @@ "source": "https://github.com/WordPress/WordPress-Coding-Standards", "wiki": "https://github.com/WordPress/WordPress-Coding-Standards/wiki" }, - "time": "2020-05-13T23:57:56+00:00" + "funding": [ + { + "url": "https://opencollective.com/php_codesniffer", + "type": "custom" + } + ], + "time": "2025-07-24T20:08:31+00:00" }, { "name": "yoast/phpunit-polyfills", @@ -2337,9 +2403,7 @@ ], "aliases": [], "minimum-stability": "dev", - "stability-flags": { - "phpcompatibility/php-compatibility": 20 - }, + "stability-flags": {}, "prefer-stable": false, "prefer-lowest": false, "platform": { diff --git a/phpcs.xml b/phpcs.xml index 981b83664..4331870e6 100644 --- a/phpcs.xml +++ b/phpcs.xml @@ -2,7 +2,8 @@ PHP 7.2 compatibility. vendor/* - vendor-patched/* + */vendor-patched/* + */Tests/* From 2e3d111a6b26f5f4c68b6c981f9a452633ec2187 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20Zieli=C5=84ski?= Date: Fri, 5 Sep 2025 11:55:46 +0200 Subject: [PATCH 2/2] Update PHPCS versions to stable ones in the CI composer version --- composer-ci-matrix-tests.json | 6 +++--- composer.json | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/composer-ci-matrix-tests.json b/composer-ci-matrix-tests.json index c1ff7bf24..3b9be8231 100644 --- a/composer-ci-matrix-tests.json +++ b/composer-ci-matrix-tests.json @@ -24,7 +24,7 @@ }, "require-dev": { "yoast/phpunit-polyfills": "^4.0.0", - "phpcompatibility/php-compatibility": "10.x-dev", + "phpcompatibility/php-compatibility": "^9.3.5", "phpunit/phpunit": "8.5.x || ^9.5" }, "autoload": { @@ -73,8 +73,8 @@ "build-blueprints-phar": "box compile -c phar-box.json", "regenerate-json-schema": "node components/Blueprints/Versions/Version2/json-schema/regenerate-schema.ts", "test": "phpunit -c phpunit.xml", - "lint": "phpcs --standard=WordPress .", - "lint-fix": "phpcbf --standard=WordPress ." + "lint": "phpcs .", + "lint-fix": "phpcbf ." }, "repositories": [ { diff --git a/composer.json b/composer.json index a047343ba..c0127837c 100644 --- a/composer.json +++ b/composer.json @@ -78,8 +78,8 @@ "build-blueprints-phar": "box compile -c phar-blueprints.json", "regenerate-json-schema": "node components/Blueprints/Versions/Version2/json-schema/regenerate-schema.ts", "test": "phpunit -c phpunit.xml", - "lint": "phpcs --standard=WordPress .", - "lint-fix": "phpcbf --standard=WordPress ." + "lint": "phpcs .", + "lint-fix": "phpcbf ." }, "repositories": [ {