Skip to content

Conversation

@hi2code
Copy link

@hi2code hi2code commented Nov 25, 2025

Add macOS Support with Homebrew Integration

Summary

This PR adds comprehensive macOS support to PVM (PHP Version Manager) by integrating with Homebrew for PHP installation and management.

Changes

  • macOS Support: Added platform detection and dedicated installation logic for macOS
  • Homebrew Integration: Uses Homebrew to install PHP versions, including support for older versions via shivammathur/php tap
  • Cross-Platform: Maintains existing Windows support while adding macOS compatibility
  • Documentation: Updated README to include macOS installation instructions

Key Features

  • Automatic Homebrew detection and validation
  • Support for installing PHP versions using brew install php@version
  • Integration with shivammathur/php tap for older PHP versions (7.x and below)
  • Proper version management and switching capabilities
  • Added uninstall command for better version management

Installation

Users can now install PVM on macOS using:

go install github.com/hjbdev/pvm@latest

Then use pvm install <version> to install PHP versions via Homebrew.

Testing

Tested on macOS and Windows with various PHP versions to ensure proper installation and switching functionality.

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