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) <noreply@anthropic.com>
This commit is contained in:
4
.github/workflows/deploy.yml
vendored
4
.github/workflows/deploy.yml
vendored
@@ -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"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user