A simple shell script to switch Apache and CLI configurations between major PHP versions for Homebrew users on macOS.
Brew PHP Switcher is a command-line tool that automates switching between different major versions of PHP on macOS systems where PHP is installed via Homebrew. It updates both Apache web server configurations and the command-line PHP version with a single command, solving the problem of manually editing config files when working on multiple projects with incompatible PHP requirements.
PHP developers on macOS who use Homebrew to manage PHP installations and need to frequently switch between different PHP versions for various projects, such as those maintaining legacy applications alongside modern ones.
Developers choose Brew PHP Switcher because it eliminates the tedious, error-prone process of manually updating Apache and CLI configurations, providing a reliable, scripted solution that ensures consistency and saves time when managing multiple PHP environments.
Brew PHP switcher is a simple shell script to switch your apache and CLI quickly between major versions of PHP. If you support multiple products/projects that are built using either brand new or old legacy PHP functionality. For users of Homebrew (or brew for short) currently only.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Switches between PHP versions from 5.6 to 8.4 with a single command, automating updates to both Apache and CLI configurations without manual edits.
Automatically modifies Apache config to use the correct Homebrew PHP module, as detailed in the README's caveats, ensuring seamless web server compatibility.
Updates the command-line PHP version to match the selected version, maintaining consistency across development tools and scripts.
Allows skipping or targeting specific configs like Apache or Valet using -s and -c flags, providing flexibility for different setup needs.
Only works on macOS with PHP installed via Homebrew, making it useless for cross-platform development or alternative package managers.
Requires commenting out the native OS X PHP module in Apache config before use, as stated in the caveats, which can be error-prone for newcomers.
Primarily focuses on Apache; while Valet is supported, other servers like Nginx are not handled, forcing manual adjustments for broader setups.