fix(ci): pin PHPCS to ^3.13 for WPCS compatibility

PHPCS 4.0.1 was installed first via sequential composer require,
locking the version before WPCS could constrain it. WPCS 3.x
requires PHPCS ^3.x. Fix: install all packages in one command
with --with-all-dependencies and pin PHPCS to ^3.13.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
peptiderepo
2026-04-17 07:40:16 +07:00
parent 808b2509d8
commit 106f15e027

View File

@@ -30,9 +30,10 @@ jobs:
- name: Install PHPCS + WordPress standards
run: |
composer global require "squizlabs/php_codesniffer=*"
composer global require "wp-coding-standards/wpcs=*"
composer global require "phpcsstandards/phpcsutils=*"
composer global require --with-all-dependencies \
"squizlabs/php_codesniffer=^3.13" \
"wp-coding-standards/wpcs=^3.0" \
"phpcsstandards/phpcsutils=^1.0"
phpcs --config-set installed_paths $(composer global config home)/vendor/wp-coding-standards/wpcs
- name: Run PHPCS