From 81f4ca872731625abd3835d39bba36275a060911 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Thu, 23 Dec 2021 20:10:29 +0000 Subject: [PATCH] Build/Test Tools: Allow the PHPCS plugin in Composer configuration. The `dealerdirect/phpcodesniffer-composer-installer` Composer plugin is used to register external PHPCS standards with PHPCS. As of Composer 2.2, Composer plugins need to be explicitly allowed to run. This commit adds the necessary configuration for that to prevent Composer asking every single time `composer install` or `composer update` is run. Reference: [https://blog.packagist.com/composer-2-2/#more-secure-plugin-execution Composer 2.2: More secure plugin execution]. Props jrf, johnbillion. Fixes #54686. git-svn-id: https://develop.svn.wordpress.org/trunk@52412 602fd350-edb4-49c9-b593-d223f7449a82 --- composer.json | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/composer.json b/composer.json index 7910a75687..13cdc84b42 100644 --- a/composer.json +++ b/composer.json @@ -19,6 +19,11 @@ "phpcompatibility/phpcompatibility-wp": "~2.1.2", "yoast/phpunit-polyfills": "^1.0.1" }, + "config": { + "allow-plugins": { + "dealerdirect/phpcodesniffer-composer-installer": true + } + }, "scripts": { "compat": "@php ./vendor/squizlabs/php_codesniffer/bin/phpcs --standard=phpcompat.xml.dist --report=summary,source", "format": "@php ./vendor/squizlabs/php_codesniffer/bin/phpcbf --report=summary,source",