From 0bba5cbd824175bd2205e2675fea122566ac075a Mon Sep 17 00:00:00 2001 From: peptiderepo Date: Wed, 15 Apr 2026 01:51:33 +0700 Subject: [PATCH] ci(deploy): allow dealerdirect/phpcodesniffer-composer-installer plugin Composer 2.2+ blocks unvetted plugins by default. The WPCS installer needs dealerdirect/phpcodesniffer-composer-installer to register standards with PHPCS, so 'composer global require wp-coding-standards/wpcs' was exiting 1 with 'plugin is blocked by your allow-plugins config' and skipping the subsequent PHPCS/PHPUnit/deploy steps. Adds a one-line 'composer global config allow-plugins' call before the require, per Composer's own suggested remediation. Unblocks the deploy pipeline for commit 428a3d5 and all future pushes. Co-Authored-By: Claude Opus 4.6 (1M context) --- .github/workflows/deploy.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 3b69618..01a6210 100755 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -30,6 +30,10 @@ jobs: - name: Install WordPress Coding Standards run: | + # Composer 2.2+ blocks plugins by default. The WPCS installer needs + # dealerdirect/phpcodesniffer-composer-installer to wire standards + # into PHPCS. Allow it globally before requiring WPCS. + composer global config --no-plugins allow-plugins.dealerdirect/phpcodesniffer-composer-installer true composer global require "wp-coding-standards/wpcs:^3.0" "phpcsstandards/phpcsutils:^1.0" --no-interaction phpcs --config-set installed_paths "$(composer global config home)/vendor/wp-coding-standards/wpcs"