From 8c6c6be1cf70891edc72d83d5b4a975c3edd5d6b Mon Sep 17 00:00:00 2001 From: Mukesh Panchal Date: Mon, 28 Aug 2023 15:40:00 +0530 Subject: [PATCH 1/5] Bump dependencies --- composer.json | 16 +- composer.lock | 170 +++++++----------- patches/remove-rules.patch | 13 -- ...Performant_WP_Query_Params_Check_Tests.php | 12 +- 4 files changed, 74 insertions(+), 137 deletions(-) delete mode 100644 patches/remove-rules.patch diff --git a/composer.json b/composer.json index 13d36a76c..d3afb829b 100644 --- a/composer.json +++ b/composer.json @@ -7,9 +7,8 @@ "php": ">=5.6", "composer/installers": "^v1.12.0 || ^2.2", "dealerdirect/phpcodesniffer-composer-installer": "^0.4.1 || ^0.5 || ^0.6.2 || ^0.7 || ^1.0", - "wp-coding-standards/wpcs": "dev-develop#fca9d9e as 2.3.0", - "automattic/vipwpcs": "2.3.3", - "cweagans/composer-patches": "^1.7" + "wp-coding-standards/wpcs": "dev-develop#bb792cb as 2.3.0", + "automattic/vipwpcs": "2.3.4" }, "require-dev": { "wp-phpunit/wp-phpunit": "^6.1", @@ -38,21 +37,12 @@ "allow-plugins": { "dealerdirect/phpcodesniffer-composer-installer": true, "composer/installers": true, - "phpstan/extension-installer": true, - "cweagans/composer-patches": true + "phpstan/extension-installer": true }, "platform": { "php": "5.6.20" } }, - "extra": { - "enable-patching": true, - "patches": { - "automattic/vipwpcs": { - "Fix incompatablity wp-coding-standards/wpcs": "patches/remove-rules.patch" - } - } - }, "autoload": { "psr-4": { "WordPress\\Plugin_Check\\": "includes/" diff --git a/composer.lock b/composer.lock index 565f2040a..1eecce9a7 100644 --- a/composer.lock +++ b/composer.lock @@ -4,32 +4,32 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "bba8b71a73452397be8ca463dcb3388e", + "content-hash": "34129e9d43832bc04dfee00f9560db71", "packages": [ { "name": "automattic/vipwpcs", - "version": "2.3.3", + "version": "2.3.4", "source": { "type": "git", "url": "https://github.com/Automattic/VIP-Coding-Standards.git", - "reference": "6cd0a6a82bc0ac988dbf9d6a7c2e293dc8ac640b" + "reference": "b8610e3837f49c5f2fcc4b663b6c0a7c9b3509b6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Automattic/VIP-Coding-Standards/zipball/6cd0a6a82bc0ac988dbf9d6a7c2e293dc8ac640b", - "reference": "6cd0a6a82bc0ac988dbf9d6a7c2e293dc8ac640b", + "url": "https://api.github.com/repos/Automattic/VIP-Coding-Standards/zipball/b8610e3837f49c5f2fcc4b663b6c0a7c9b3509b6", + "reference": "b8610e3837f49c5f2fcc4b663b6c0a7c9b3509b6", "shasum": "" }, "require": { - "dealerdirect/phpcodesniffer-composer-installer": "^0.4.1 || ^0.5 || ^0.6.2 || ^0.7", + "dealerdirect/phpcodesniffer-composer-installer": "^0.4.1 || ^0.5 || ^0.6.2 || ^0.7 || ^1.0", "php": ">=5.4", - "sirbrillig/phpcs-variable-analysis": "^2.11.1", - "squizlabs/php_codesniffer": "^3.5.5", + "sirbrillig/phpcs-variable-analysis": "^2.11.17", + "squizlabs/php_codesniffer": "^3.7.1", "wp-coding-standards/wpcs": "^2.3" }, "require-dev": { - "php-parallel-lint/php-console-highlighter": "^0.5", - "php-parallel-lint/php-parallel-lint": "^1.0", + "php-parallel-lint/php-console-highlighter": "^1.0.0", + "php-parallel-lint/php-parallel-lint": "^1.3.2", "phpcompatibility/php-compatibility": "^9", "phpcsstandards/phpcsdevtools": "^1.0", "phpunit/phpunit": "^4 || ^5 || ^6 || ^7" @@ -49,6 +49,7 @@ "keywords": [ "phpcs", "standards", + "static analysis", "wordpress" ], "support": { @@ -56,7 +57,7 @@ "source": "https://github.com/Automattic/VIP-Coding-Standards", "wiki": "https://github.com/Automattic/VIP-Coding-Standards/wiki" }, - "time": "2021-09-29T16:20:23+00:00" + "time": "2023-08-24T15:11:13+00:00" }, { "name": "composer/installers", @@ -209,85 +210,40 @@ ], "time": "2021-09-13T08:19:44+00:00" }, - { - "name": "cweagans/composer-patches", - "version": "1.7.3", - "source": { - "type": "git", - "url": "https://github.com/cweagans/composer-patches.git", - "reference": "e190d4466fe2b103a55467dfa83fc2fecfcaf2db" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/cweagans/composer-patches/zipball/e190d4466fe2b103a55467dfa83fc2fecfcaf2db", - "reference": "e190d4466fe2b103a55467dfa83fc2fecfcaf2db", - "shasum": "" - }, - "require": { - "composer-plugin-api": "^1.0 || ^2.0", - "php": ">=5.3.0" - }, - "require-dev": { - "composer/composer": "~1.0 || ~2.0", - "phpunit/phpunit": "~4.6" - }, - "type": "composer-plugin", - "extra": { - "class": "cweagans\\Composer\\Patches" - }, - "autoload": { - "psr-4": { - "cweagans\\Composer\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Cameron Eagans", - "email": "me@cweagans.net" - } - ], - "description": "Provides a way to patch Composer packages.", - "support": { - "issues": "https://github.com/cweagans/composer-patches/issues", - "source": "https://github.com/cweagans/composer-patches/tree/1.7.3" - }, - "time": "2022-12-20T22:53:13+00:00" - }, { "name": "dealerdirect/phpcodesniffer-composer-installer", - "version": "v0.7.2", + "version": "v1.0.0", "source": { "type": "git", - "url": "https://github.com/Dealerdirect/phpcodesniffer-composer-installer.git", - "reference": "1c968e542d8843d7cd71de3c5c9c3ff3ad71a1db" + "url": "https://github.com/PHPCSStandards/composer-installer.git", + "reference": "4be43904336affa5c2f70744a348312336afd0da" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Dealerdirect/phpcodesniffer-composer-installer/zipball/1c968e542d8843d7cd71de3c5c9c3ff3ad71a1db", - "reference": "1c968e542d8843d7cd71de3c5c9c3ff3ad71a1db", + "url": "https://api.github.com/repos/PHPCSStandards/composer-installer/zipball/4be43904336affa5c2f70744a348312336afd0da", + "reference": "4be43904336affa5c2f70744a348312336afd0da", "shasum": "" }, "require": { "composer-plugin-api": "^1.0 || ^2.0", - "php": ">=5.3", + "php": ">=5.4", "squizlabs/php_codesniffer": "^2.0 || ^3.1.0 || ^4.0" }, "require-dev": { "composer/composer": "*", + "ext-json": "*", + "ext-zip": "*", "php-parallel-lint/php-parallel-lint": "^1.3.1", - "phpcompatibility/php-compatibility": "^9.0" + "phpcompatibility/php-compatibility": "^9.0", + "yoast/phpunit-polyfills": "^1.0" }, "type": "composer-plugin", "extra": { - "class": "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin" + "class": "PHPCSStandards\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin" }, "autoload": { "psr-4": { - "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\": "src/" + "PHPCSStandards\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -303,7 +259,7 @@ }, { "name": "Contributors", - "homepage": "https://github.com/Dealerdirect/phpcodesniffer-composer-installer/graphs/contributors" + "homepage": "https://github.com/PHPCSStandards/composer-installer/graphs/contributors" } ], "description": "PHP_CodeSniffer Standards Composer Installer Plugin", @@ -327,28 +283,28 @@ "tests" ], "support": { - "issues": "https://github.com/dealerdirect/phpcodesniffer-composer-installer/issues", - "source": "https://github.com/dealerdirect/phpcodesniffer-composer-installer" + "issues": "https://github.com/PHPCSStandards/composer-installer/issues", + "source": "https://github.com/PHPCSStandards/composer-installer" }, - "time": "2022-02-04T12:51:07+00:00" + "time": "2023-01-05T11:28:13+00:00" }, { "name": "phpcsstandards/phpcsextra", - "version": "1.0.4", + "version": "1.1.1", "source": { "type": "git", "url": "https://github.com/PHPCSStandards/PHPCSExtra.git", - "reference": "029af41e270ae73f10c0e9a1ce376b12da4e4810" + "reference": "98bcdbacbda14b1db85f710b1853125726795bbc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPCSStandards/PHPCSExtra/zipball/029af41e270ae73f10c0e9a1ce376b12da4e4810", - "reference": "029af41e270ae73f10c0e9a1ce376b12da4e4810", + "url": "https://api.github.com/repos/PHPCSStandards/PHPCSExtra/zipball/98bcdbacbda14b1db85f710b1853125726795bbc", + "reference": "98bcdbacbda14b1db85f710b1853125726795bbc", "shasum": "" }, "require": { "php": ">=5.4", - "phpcsstandards/phpcsutils": "^1.0.6", + "phpcsstandards/phpcsutils": "^1.0.8", "squizlabs/php_codesniffer": "^3.7.1" }, "require-dev": { @@ -393,20 +349,20 @@ "issues": "https://github.com/PHPCSStandards/PHPCSExtra/issues", "source": "https://github.com/PHPCSStandards/PHPCSExtra" }, - "time": "2023-06-17T22:57:40+00:00" + "time": "2023-08-26T04:46:45+00:00" }, { "name": "phpcsstandards/phpcsutils", - "version": "1.0.6", + "version": "1.0.8", "source": { "type": "git", "url": "https://github.com/PHPCSStandards/PHPCSUtils.git", - "reference": "ba259eaaefac118648e1263919b9530667ffcf01" + "reference": "69465cab9d12454e5e7767b9041af0cd8cd13be7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPCSStandards/PHPCSUtils/zipball/ba259eaaefac118648e1263919b9530667ffcf01", - "reference": "ba259eaaefac118648e1263919b9530667ffcf01", + "url": "https://api.github.com/repos/PHPCSStandards/PHPCSUtils/zipball/69465cab9d12454e5e7767b9041af0cd8cd13be7", + "reference": "69465cab9d12454e5e7767b9041af0cd8cd13be7", "shasum": "" }, "require": { @@ -419,7 +375,7 @@ "php-parallel-lint/php-console-highlighter": "^1.0", "php-parallel-lint/php-parallel-lint": "^1.3.2", "phpcsstandards/phpcsdevcs": "^1.1.6", - "yoast/phpunit-polyfills": "^1.0.5" + "yoast/phpunit-polyfills": "^1.0.5 || ^2.0.0" }, "type": "phpcodesniffer-standard", "extra": { @@ -466,20 +422,20 @@ "issues": "https://github.com/PHPCSStandards/PHPCSUtils/issues", "source": "https://github.com/PHPCSStandards/PHPCSUtils" }, - "time": "2023-05-27T13:39:12+00:00" + "time": "2023-07-16T21:39:41+00:00" }, { "name": "sirbrillig/phpcs-variable-analysis", - "version": "v2.11.16", + "version": "v2.11.17", "source": { "type": "git", "url": "https://github.com/sirbrillig/phpcs-variable-analysis.git", - "reference": "dc5582dc5a93a235557af73e523c389aac9a8e88" + "reference": "3b71162a6bf0cde2bff1752e40a1788d8273d049" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sirbrillig/phpcs-variable-analysis/zipball/dc5582dc5a93a235557af73e523c389aac9a8e88", - "reference": "dc5582dc5a93a235557af73e523c389aac9a8e88", + "url": "https://api.github.com/repos/sirbrillig/phpcs-variable-analysis/zipball/3b71162a6bf0cde2bff1752e40a1788d8273d049", + "reference": "3b71162a6bf0cde2bff1752e40a1788d8273d049", "shasum": "" }, "require": { @@ -524,7 +480,7 @@ "source": "https://github.com/sirbrillig/phpcs-variable-analysis", "wiki": "https://github.com/sirbrillig/phpcs-variable-analysis/wiki" }, - "time": "2023-03-31T16:46:32+00:00" + "time": "2023-08-05T23:46:11+00:00" }, { "name": "squizlabs/php_codesniffer", @@ -589,19 +545,22 @@ "source": { "type": "git", "url": "https://github.com/WordPress/WordPress-Coding-Standards.git", - "reference": "fca9d9e" + "reference": "bb792cb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/WordPress/WordPress-Coding-Standards/zipball/fca9d9e", - "reference": "fca9d9e", + "url": "https://api.github.com/repos/WordPress/WordPress-Coding-Standards/zipball/bb792cb", + "reference": "bb792cb", "shasum": "" }, "require": { "ext-filter": "*", + "ext-libxml": "*", + "ext-tokenizer": "*", + "ext-xmlreader": "*", "php": ">=5.4", - "phpcsstandards/phpcsextra": "^1.0", - "phpcsstandards/phpcsutils": "^1.0.5", + "phpcsstandards/phpcsextra": "^1.1.0", + "phpcsstandards/phpcsutils": "^1.0.8", "squizlabs/php_codesniffer": "^3.7.2" }, "require-dev": { @@ -612,6 +571,7 @@ "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" }, "suggest": { + "ext-iconv": "For improved results", "ext-mbstring": "For improved results" }, "default-branch": true, @@ -638,7 +598,7 @@ "source": "https://github.com/WordPress/WordPress-Coding-Standards", "wiki": "https://github.com/WordPress/WordPress-Coding-Standards/wiki" }, - "time": "2023-06-20T15:25:34+00:00" + "time": "2023-08-21T14:28:38+00:00" } ], "packages-dev": [ @@ -2175,16 +2135,16 @@ }, { "name": "wp-phpunit/wp-phpunit", - "version": "6.2.0", + "version": "6.3.0", "source": { "type": "git", "url": "https://github.com/wp-phpunit/wp-phpunit.git", - "reference": "3b7ab767dde017dec9327cc024e9f26fd776a57b" + "reference": "4797791a311c41d213027333e4fcc48073f77df0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/wp-phpunit/wp-phpunit/zipball/3b7ab767dde017dec9327cc024e9f26fd776a57b", - "reference": "3b7ab767dde017dec9327cc024e9f26fd776a57b", + "url": "https://api.github.com/repos/wp-phpunit/wp-phpunit/zipball/4797791a311c41d213027333e4fcc48073f77df0", + "reference": "4797791a311c41d213027333e4fcc48073f77df0", "shasum": "" }, "type": "library", @@ -2219,20 +2179,20 @@ "issues": "https://github.com/wp-phpunit/issues", "source": "https://github.com/wp-phpunit/wp-phpunit" }, - "time": "2023-03-30T01:15:51+00:00" + "time": "2023-08-09T01:26:57+00:00" }, { "name": "yoast/phpunit-polyfills", - "version": "1.0.5", + "version": "1.1.0", "source": { "type": "git", "url": "https://github.com/Yoast/PHPUnit-Polyfills.git", - "reference": "3b59adeef77fb1c03ff5381dbb9d68b0aaff3171" + "reference": "224e4a1329c03d8bad520e3fc4ec980034a4b212" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Yoast/PHPUnit-Polyfills/zipball/3b59adeef77fb1c03ff5381dbb9d68b0aaff3171", - "reference": "3b59adeef77fb1c03ff5381dbb9d68b0aaff3171", + "url": "https://api.github.com/repos/Yoast/PHPUnit-Polyfills/zipball/224e4a1329c03d8bad520e3fc4ec980034a4b212", + "reference": "224e4a1329c03d8bad520e3fc4ec980034a4b212", "shasum": "" }, "require": { @@ -2279,7 +2239,7 @@ "issues": "https://github.com/Yoast/PHPUnit-Polyfills/issues", "source": "https://github.com/Yoast/PHPUnit-Polyfills" }, - "time": "2023-03-30T23:39:05+00:00" + "time": "2023-08-19T14:25:08+00:00" } ], "aliases": [ diff --git a/patches/remove-rules.patch b/patches/remove-rules.patch deleted file mode 100644 index 5e2a1a48e..000000000 --- a/patches/remove-rules.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/WordPressVIPMinimum/ruleset.xml b/WordPressVIPMinimum/ruleset.xml -index 2ce2511..dd306ca 100644 ---- a/WordPressVIPMinimum/ruleset.xml -+++ b/WordPressVIPMinimum/ruleset.xml -@@ -26,8 +26,6 @@ - - - -- -- - - - diff --git a/tests/phpunit/Checker/Checks/Performant_WP_Query_Params_Check_Tests.php b/tests/phpunit/Checker/Checks/Performant_WP_Query_Params_Check_Tests.php index 1aa95fed1..6f2912227 100644 --- a/tests/phpunit/Checker/Checks/Performant_WP_Query_Params_Check_Tests.php +++ b/tests/phpunit/Checker/Checks/Performant_WP_Query_Params_Check_Tests.php @@ -32,15 +32,15 @@ public function test_run_with_errors() { // Check for WordPress.DB.SlowDBQuery.slow_db_query_meta_query warning. $this->assertArrayHasKey( 27, $warnings['load.php'] ); - $this->assertArrayHasKey( 26, $warnings['load.php'][27] ); - $this->assertArrayHasKey( 'code', $warnings['load.php'][27][26][0] ); - $this->assertEquals( 'WordPress.DB.SlowDBQuery.slow_db_query_meta_query', $warnings['load.php'][27][26][0]['code'] ); + $this->assertArrayHasKey( 9, $warnings['load.php'][27] ); + $this->assertArrayHasKey( 'code', $warnings['load.php'][27][9][0] ); + $this->assertEquals( 'WordPress.DB.SlowDBQuery.slow_db_query_meta_query', $warnings['load.php'][27][9][0]['code'] ); // Check for WordPress.DB.SlowDBQuery.slow_db_query_tax_query warning. $this->assertArrayHasKey( 34, $warnings['load.php'] ); - $this->assertArrayHasKey( 26, $warnings['load.php'][34] ); - $this->assertArrayHasKey( 'code', $warnings['load.php'][34][26][0] ); - $this->assertEquals( 'WordPress.DB.SlowDBQuery.slow_db_query_tax_query', $warnings['load.php'][34][26][0]['code'] ); + $this->assertArrayHasKey( 9, $warnings['load.php'][34] ); + $this->assertArrayHasKey( 'code', $warnings['load.php'][34][9][0] ); + $this->assertEquals( 'WordPress.DB.SlowDBQuery.slow_db_query_tax_query', $warnings['load.php'][34][9][0]['code'] ); } public function test_run_without_errors() { From 71d333fedbb51e632a92fcc295e6a2706bad1342 Mon Sep 17 00:00:00 2001 From: Mukesh Panchal Date: Mon, 28 Aug 2023 16:08:09 +0530 Subject: [PATCH 2/5] Revert some changes --- composer.json | 14 ++++++++++++-- composer.lock | 50 +++++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 61 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index d3afb829b..952d8af7d 100644 --- a/composer.json +++ b/composer.json @@ -8,7 +8,8 @@ "composer/installers": "^v1.12.0 || ^2.2", "dealerdirect/phpcodesniffer-composer-installer": "^0.4.1 || ^0.5 || ^0.6.2 || ^0.7 || ^1.0", "wp-coding-standards/wpcs": "dev-develop#bb792cb as 2.3.0", - "automattic/vipwpcs": "2.3.4" + "automattic/vipwpcs": "^2.3.3 || ^2.3.4", + "cweagans/composer-patches": "^1.7" }, "require-dev": { "wp-phpunit/wp-phpunit": "^6.1", @@ -37,12 +38,21 @@ "allow-plugins": { "dealerdirect/phpcodesniffer-composer-installer": true, "composer/installers": true, - "phpstan/extension-installer": true + "phpstan/extension-installer": true, + "cweagans/composer-patches": true }, "platform": { "php": "5.6.20" } }, + "extra": { + "enable-patching": true, + "patches": { + "automattic/vipwpcs": { + "Fix incompatablity wp-coding-standards/wpcs": "patches/remove-rules.patch" + } + } + }, "autoload": { "psr-4": { "WordPress\\Plugin_Check\\": "includes/" diff --git a/composer.lock b/composer.lock index 1eecce9a7..110fba3ec 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": "34129e9d43832bc04dfee00f9560db71", + "content-hash": "ef69c1bbb1bb3be924683d017cf2aa98", "packages": [ { "name": "automattic/vipwpcs", @@ -210,6 +210,54 @@ ], "time": "2021-09-13T08:19:44+00:00" }, + { + "name": "cweagans/composer-patches", + "version": "1.7.3", + "source": { + "type": "git", + "url": "https://github.com/cweagans/composer-patches.git", + "reference": "e190d4466fe2b103a55467dfa83fc2fecfcaf2db" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/cweagans/composer-patches/zipball/e190d4466fe2b103a55467dfa83fc2fecfcaf2db", + "reference": "e190d4466fe2b103a55467dfa83fc2fecfcaf2db", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^1.0 || ^2.0", + "php": ">=5.3.0" + }, + "require-dev": { + "composer/composer": "~1.0 || ~2.0", + "phpunit/phpunit": "~4.6" + }, + "type": "composer-plugin", + "extra": { + "class": "cweagans\\Composer\\Patches" + }, + "autoload": { + "psr-4": { + "cweagans\\Composer\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Cameron Eagans", + "email": "me@cweagans.net" + } + ], + "description": "Provides a way to patch Composer packages.", + "support": { + "issues": "https://github.com/cweagans/composer-patches/issues", + "source": "https://github.com/cweagans/composer-patches/tree/1.7.3" + }, + "time": "2022-12-20T22:53:13+00:00" + }, { "name": "dealerdirect/phpcodesniffer-composer-installer", "version": "v1.0.0", From da63ed3863ce4d50d665d9620da71e14c42bcb40 Mon Sep 17 00:00:00 2001 From: Mukesh Panchal Date: Mon, 28 Aug 2023 16:12:37 +0530 Subject: [PATCH 3/5] Add missing file --- patches/patches/remove-rules.patch | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 patches/patches/remove-rules.patch diff --git a/patches/patches/remove-rules.patch b/patches/patches/remove-rules.patch new file mode 100644 index 000000000..5e2a1a48e --- /dev/null +++ b/patches/patches/remove-rules.patch @@ -0,0 +1,13 @@ +diff --git a/WordPressVIPMinimum/ruleset.xml b/WordPressVIPMinimum/ruleset.xml +index 2ce2511..dd306ca 100644 +--- a/WordPressVIPMinimum/ruleset.xml ++++ b/WordPressVIPMinimum/ruleset.xml +@@ -26,8 +26,6 @@ + + + +- +- + + + From f3b0904e8deaaae9e49c90d892c4892df536811b Mon Sep 17 00:00:00 2001 From: Mukesh Panchal Date: Mon, 28 Aug 2023 16:13:58 +0530 Subject: [PATCH 4/5] Add missing file --- patches/{patches => }/remove-rules.patch | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename patches/{patches => }/remove-rules.patch (100%) diff --git a/patches/patches/remove-rules.patch b/patches/remove-rules.patch similarity index 100% rename from patches/patches/remove-rules.patch rename to patches/remove-rules.patch From 7ddb7e60c28d7f3a796ac0b555c92e6e1f58d07d Mon Sep 17 00:00:00 2001 From: Mukesh Panchal Date: Mon, 28 Aug 2023 16:45:03 +0530 Subject: [PATCH 5/5] Update dependancies --- composer.json | 15 +--- composer.lock | 85 +++++-------------- patches/remove-rules.patch | 13 --- ...Performant_WP_Query_Params_Check_Tests.php | 4 +- 4 files changed, 24 insertions(+), 93 deletions(-) delete mode 100644 patches/remove-rules.patch diff --git a/composer.json b/composer.json index 952d8af7d..976c4aa04 100644 --- a/composer.json +++ b/composer.json @@ -7,9 +7,8 @@ "php": ">=5.6", "composer/installers": "^v1.12.0 || ^2.2", "dealerdirect/phpcodesniffer-composer-installer": "^0.4.1 || ^0.5 || ^0.6.2 || ^0.7 || ^1.0", - "wp-coding-standards/wpcs": "dev-develop#bb792cb as 2.3.0", - "automattic/vipwpcs": "^2.3.3 || ^2.3.4", - "cweagans/composer-patches": "^1.7" + "wp-coding-standards/wpcs": "3.0.0", + "automattic/vipwpcs": "dev-develop#64aa799 as 2.3.4" }, "require-dev": { "wp-phpunit/wp-phpunit": "^6.1", @@ -39,20 +38,12 @@ "dealerdirect/phpcodesniffer-composer-installer": true, "composer/installers": true, "phpstan/extension-installer": true, - "cweagans/composer-patches": true + "cweagans/composer-patches": false }, "platform": { "php": "5.6.20" } }, - "extra": { - "enable-patching": true, - "patches": { - "automattic/vipwpcs": { - "Fix incompatablity wp-coding-standards/wpcs": "patches/remove-rules.patch" - } - } - }, "autoload": { "psr-4": { "WordPress\\Plugin_Check\\": "includes/" diff --git a/composer.lock b/composer.lock index 110fba3ec..90ace644c 100644 --- a/composer.lock +++ b/composer.lock @@ -4,28 +4,29 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "ef69c1bbb1bb3be924683d017cf2aa98", + "content-hash": "333a5e08a7ab235faa8f4f04df7604f5", "packages": [ { "name": "automattic/vipwpcs", - "version": "2.3.4", + "version": "dev-develop", "source": { "type": "git", "url": "https://github.com/Automattic/VIP-Coding-Standards.git", - "reference": "b8610e3837f49c5f2fcc4b663b6c0a7c9b3509b6" + "reference": "64aa799" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Automattic/VIP-Coding-Standards/zipball/b8610e3837f49c5f2fcc4b663b6c0a7c9b3509b6", - "reference": "b8610e3837f49c5f2fcc4b663b6c0a7c9b3509b6", + "url": "https://api.github.com/repos/Automattic/VIP-Coding-Standards/zipball/64aa799", + "reference": "64aa799", "shasum": "" }, "require": { - "dealerdirect/phpcodesniffer-composer-installer": "^0.4.1 || ^0.5 || ^0.6.2 || ^0.7 || ^1.0", "php": ">=5.4", + "phpcsstandards/phpcsextra": "^1.1.0", + "phpcsstandards/phpcsutils": "^1.0.8", "sirbrillig/phpcs-variable-analysis": "^2.11.17", - "squizlabs/php_codesniffer": "^3.7.1", - "wp-coding-standards/wpcs": "^2.3" + "squizlabs/php_codesniffer": "^3.7.2", + "wp-coding-standards/wpcs": "^3.0" }, "require-dev": { "php-parallel-lint/php-console-highlighter": "^1.0.0", @@ -34,6 +35,7 @@ "phpcsstandards/phpcsdevtools": "^1.0", "phpunit/phpunit": "^4 || ^5 || ^6 || ^7" }, + "default-branch": true, "type": "phpcodesniffer-standard", "notification-url": "https://packagist.org/downloads/", "license": [ @@ -57,7 +59,7 @@ "source": "https://github.com/Automattic/VIP-Coding-Standards", "wiki": "https://github.com/Automattic/VIP-Coding-Standards/wiki" }, - "time": "2023-08-24T15:11:13+00:00" + "time": "2023-08-26T08:01:08+00:00" }, { "name": "composer/installers", @@ -210,54 +212,6 @@ ], "time": "2021-09-13T08:19:44+00:00" }, - { - "name": "cweagans/composer-patches", - "version": "1.7.3", - "source": { - "type": "git", - "url": "https://github.com/cweagans/composer-patches.git", - "reference": "e190d4466fe2b103a55467dfa83fc2fecfcaf2db" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/cweagans/composer-patches/zipball/e190d4466fe2b103a55467dfa83fc2fecfcaf2db", - "reference": "e190d4466fe2b103a55467dfa83fc2fecfcaf2db", - "shasum": "" - }, - "require": { - "composer-plugin-api": "^1.0 || ^2.0", - "php": ">=5.3.0" - }, - "require-dev": { - "composer/composer": "~1.0 || ~2.0", - "phpunit/phpunit": "~4.6" - }, - "type": "composer-plugin", - "extra": { - "class": "cweagans\\Composer\\Patches" - }, - "autoload": { - "psr-4": { - "cweagans\\Composer\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Cameron Eagans", - "email": "me@cweagans.net" - } - ], - "description": "Provides a way to patch Composer packages.", - "support": { - "issues": "https://github.com/cweagans/composer-patches/issues", - "source": "https://github.com/cweagans/composer-patches/tree/1.7.3" - }, - "time": "2022-12-20T22:53:13+00:00" - }, { "name": "dealerdirect/phpcodesniffer-composer-installer", "version": "v1.0.0", @@ -589,16 +543,16 @@ }, { "name": "wp-coding-standards/wpcs", - "version": "dev-develop", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/WordPress/WordPress-Coding-Standards.git", - "reference": "bb792cb" + "reference": "bb792cb331472b82c5d7f28fb9b8ec2d20f68826" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/WordPress/WordPress-Coding-Standards/zipball/bb792cb", - "reference": "bb792cb", + "url": "https://api.github.com/repos/WordPress/WordPress-Coding-Standards/zipball/bb792cb331472b82c5d7f28fb9b8ec2d20f68826", + "reference": "bb792cb331472b82c5d7f28fb9b8ec2d20f68826", "shasum": "" }, "require": { @@ -622,7 +576,6 @@ "ext-iconv": "For improved results", "ext-mbstring": "For improved results" }, - "default-branch": true, "type": "phpcodesniffer-standard", "notification-url": "https://packagist.org/downloads/", "license": [ @@ -2292,15 +2245,15 @@ ], "aliases": [ { - "package": "wp-coding-standards/wpcs", + "package": "automattic/vipwpcs", "version": "dev-develop", - "alias": "2.3.0", - "alias_normalized": "2.3.0.0" + "alias": "2.3.4", + "alias_normalized": "2.3.4.0" } ], "minimum-stability": "stable", "stability-flags": { - "wp-coding-standards/wpcs": 20 + "automattic/vipwpcs": 20 }, "prefer-stable": false, "prefer-lowest": false, diff --git a/patches/remove-rules.patch b/patches/remove-rules.patch deleted file mode 100644 index 5e2a1a48e..000000000 --- a/patches/remove-rules.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/WordPressVIPMinimum/ruleset.xml b/WordPressVIPMinimum/ruleset.xml -index 2ce2511..dd306ca 100644 ---- a/WordPressVIPMinimum/ruleset.xml -+++ b/WordPressVIPMinimum/ruleset.xml -@@ -26,8 +26,6 @@ - - - -- -- - - - diff --git a/tests/phpunit/Checker/Checks/Performant_WP_Query_Params_Check_Tests.php b/tests/phpunit/Checker/Checks/Performant_WP_Query_Params_Check_Tests.php index 6f2912227..a3db7d019 100644 --- a/tests/phpunit/Checker/Checks/Performant_WP_Query_Params_Check_Tests.php +++ b/tests/phpunit/Checker/Checks/Performant_WP_Query_Params_Check_Tests.php @@ -24,11 +24,11 @@ public function test_run_with_errors() { $this->assertArrayHasKey( 'load.php', $warnings ); $this->assertEquals( 3, $check_result->get_warning_count() ); - // Check for WordPressVIPMinimum.Performance.WPQueryParams.PostNotIn error. + // Check for WordPressVIPMinimum.Performance.WPQueryParams.PostNotIn_post__not_in error. $this->assertArrayHasKey( 24, $warnings['load.php'] ); $this->assertArrayHasKey( 9, $warnings['load.php'][24] ); $this->assertArrayHasKey( 'code', $warnings['load.php'][24][9][0] ); - $this->assertEquals( 'WordPressVIPMinimum.Performance.WPQueryParams.PostNotIn', $warnings['load.php'][24][9][0]['code'] ); + $this->assertEquals( 'WordPressVIPMinimum.Performance.WPQueryParams.PostNotIn_post__not_in', $warnings['load.php'][24][9][0]['code'] ); // Check for WordPress.DB.SlowDBQuery.slow_db_query_meta_query warning. $this->assertArrayHasKey( 27, $warnings['load.php'] );