pvm icon indicating copy to clipboard operation
pvm copied to clipboard

Macos support

Open hi2code opened this issue 2 months ago • 0 comments

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.

hi2code avatar Nov 25 '25 08:11 hi2code