Skip to content

v1.8.1 — global Composer that follows the active PHP version (B4)#15

Merged
devhardiyanto merged 1 commit into
mainfrom
feat/v1.8.1-composer-global
Jun 18, 2026
Merged

v1.8.1 — global Composer that follows the active PHP version (B4)#15
devhardiyanto merged 1 commit into
mainfrom
feat/v1.8.1-composer-global

Conversation

@devhardiyanto

Copy link
Copy Markdown
Owner

Resolves ROADMAP B4. Composer is installed once and follows the active PHP version, so phpvm use <other> no longer needs a re-run of phpvm composer.

Changes

  • Linux: composer.phar -> ~/.phpvm/composer.phar; shim ~/.phpvm/bin/composer execs current/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.
  • Windows: composer.phar -> ~/.phpvm; composer.bat -> ~/.phpvm/bin (already on PATH), calls php from PATH (the active version).
  • Dropped the per-version "re-run after phpvm use" note on both OSes.

Tests / checks

  • bats composer idempotency test updated to the global paths.
  • 47/47 Pester pass; PSScriptAnalyzer clean (fixed a stray em-dash to ASCII).
  • bash -n clean; verified PATH ordering and the "already installed" branch locally.
  • Version bumped to 1.8.1 (5 sources); README updated.

Caveat

  • Composer 2.x requires PHP >= 7.2.5 (documented in README).

🤖 Generated with Claude Code

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.
@devhardiyanto devhardiyanto merged commit b62f6e5 into main Jun 18, 2026
3 checks passed
@devhardiyanto devhardiyanto deleted the feat/v1.8.1-composer-global branch June 18, 2026 17:29
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