Sprint 13: WP-CLI support (phpvm wp-cli) + legacy hook verb removal (1.11.0)#22
Merged
Conversation
… aliases Old verbs now fall through to the hook usage help; use enable/disable. README Windows auto-switch section updated to match. devhardiyanto
…verification
Modeled on Invoke-Composer: wp-cli.phar in $PHPVM_DIR, wp.bat shim in
$PHPVM_BIN so wp follows the active PHP version. Hash verified via PHP
hash_file('sha512') against the upstream .sha512, honoring PHPVM_SKIP_HASH.
devhardiyanto
…rification
Modeled on phpvm_composer: wp-cli.phar in $PHPVM_DIR, POSIX wp shim in
$PHPVM_BIN so wp follows the active PHP version. Hash verified via PHP
hash_file('sha512') — no sha512sum/shasum, so GNU and BSD/macOS share one path.
devhardiyanto
Pester: mocked Invoke-WebRequest/Get-WebString + fake php.bat for hash_file. bats: curl shell-function stub + FAKE_PHP_HASH double, plus dispatch route. devhardiyanto
devhardiyanto
devhardiyanto
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Sprint 13 (v1.11.0): new
phpvm wp-clicommand — global WP-CLI install that follows the active PHP version — plus hard removal of the legacyphpvm hook install/uninstall/removeverb aliases.Breaking:
phpvm hook install/uninstall/removeremoved — usephpvm hook enable/disable. The old verbs were a one-sprint compatibility shim from Sprint 12 and now fall through to thephpvm hookusage help.Why
B18 (WP-CLI support, cross-platform) + B19 (post-1.10.0 housekeeping — the audit found no dead code, only these lingering aliases). Plan:
docs/reports/arch/sprint13-plan.md.How
phpvm wp-cliis modeled 1:1 onphpvm composer, the existing precedent for a global CLI phar:wp-cli.pharin~/.phpvm/, awpshim in~/.phpvm/bin/(on PATH) that runs whatever PHP is active. Integrity is verified against the upstreamwp-cli.phar.sha512via PHP's ownhash_file('sha512', ...)— nosha512sum/shasum, so one code path covers Linux (GNU) and macOS (BSD). Windows honors the existingPHPVM_SKIP_HASHescape hatch.Changes
windows/phpvm.ps1—Invoke-WpCli+ dispatcher/help/did-you-mean wiring; hook aliases removed fromInvoke-Hooklinux/phpvm.sh—phpvm_wp_cli+ dispatcher/help/did-you-mean wiring; hook aliases removed fromphpvm_hooktests/windows/WpCli.Tests.ps1— install, idempotency, hash-mismatch, skip-hash (mocked, offline)tests/linux/commands.bats— same coverage via curl-stub + fake-php doubles, plus dispatch routeREADME.md— new WP-CLI section; Windows hook examples now useenable/disableTesting Done
bash -nonphpvm.sh/install.sh; wp-cli install/idempotency/mismatch flows exercised manually in Git Bash (bats not available locally — CI runs it)