Skip to content

fix(wp-cli): route @alias SSH commands to the vendored wp-cli#438

Open
oxyc wants to merge 7 commits into
masterfrom
fix/wp-cli-vendored-pre-ssh
Open

fix(wp-cli): route @alias SSH commands to the vendored wp-cli#438
oxyc wants to merge 7 commits into
masterfrom
fix/wp-cli-vendored-pre-ssh

Conversation

@oxyc

@oxyc oxyc commented Jun 25, 2026

Copy link
Copy Markdown
Member

Standardises config/wp-cli/pre-ssh.php so wp @alias SSH commands route to the vendored wp-cli on the remote instead of falling back to a global, outdated one.

Two bugs this addresses (your repo had at least one):

  1. The Symfony\\Component\\Yaml\\Yaml + class_exists() variant is silently skipped in the wp-cli runtime (the class isn't autoloadable there), so <release>/vendor/bin is never prepended to the remote $PATH.
  2. wp-cli 2.13+ exposes $runner->alias without its leading @ (production vs @production), so the alias lookup in wp-cli.yml misses and the hook bails before exporting WP_CLI_SSH_PRE_CMD.

When the vendored path is dropped, the remote uses a global wp-cli whose bundled symfony/console clashes with Acorn's illuminate/console v13:

Declaration of Illuminate\\Console\\Command::setHidden(...): static must be
compatible with Symfony\\Component\\Console\\Command\\Command::setHidden()

The fix uses wp-cli's bundled Spyc parser and normalises the alias key, so it works on old and new wp-cli. Verified in generoi/suomentyokalu#409.

🤖 Generated with Claude Code

oxyc and others added 7 commits June 25, 2026 10:48
wp-phpunit's abstract-testcase calls PHPUnit\Util\Test::parseTestMethodAnnotations(),
removed in PHPUnit 10, so the open-ended ">=9.0" constraint resolving to
PHPUnit 12 broke `composer phpunit`. Pin to >=9.0 <10 (matches the working
stack on other Genero sites).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant