v1.8.1 — global Composer that follows the active PHP version (B4)#15
Merged
Conversation
Composer is now installed once instead of per PHP version, so switching with `phpvm use` no longer requires re-running `phpvm composer`. - Linux: composer.phar at ~/.phpvm/composer.phar; shim ~/.phpvm/bin/composer execs current/bin/php. Added ~/.phpvm/bin (PHPVM_BIN) to PATH (ahead of the active version's bin so the global composer wins over any stale per-version shim); php/pecl/etc. still resolve from the active version. - Windows: composer.phar at ~/.phpvm; composer.bat in ~/.phpvm/bin (already on PATH) calls `php` from PATH, i.e. the active version. - Dropped the "re-run after phpvm use" note on both. README + version bump to 1.8.1; bats composer idempotency test updated to the global paths. Caveat documented: Composer 2.x needs PHP >= 7.2.5.
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.
Resolves ROADMAP B4. Composer is installed once and follows the active PHP version, so
phpvm use <other>no longer needs a re-run ofphpvm composer.Changes
composer.phar->~/.phpvm/composer.phar; shim~/.phpvm/bin/composerexecscurrent/bin/php. Added~/.phpvm/bin(PHPVM_BIN) to PATH, ordered ahead of the active version's bin so the global composer wins over any stale per-version shim;php/pecl/etc. still resolve from the active version.composer.phar->~/.phpvm;composer.bat->~/.phpvm/bin(already on PATH), callsphpfrom PATH (the active version).phpvm use" note on both OSes.Tests / checks
bash -nclean; verified PATH ordering and the "already installed" branch locally.Caveat
🤖 Generated with Claude Code