pvm
pvm copied to clipboard
Macos support
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/phptap - 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/phptap 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.