diff --git a/README.md b/README.md index f0ea56c..a023a55 100644 --- a/README.md +++ b/README.md @@ -80,20 +80,50 @@ If you're still having issues, here's a few common questions & answers, as well Which versions of PHP are supported? For more details, consult the [constants file](https://github.com/nicoverbruggen/phpmon/blob/main/phpmon/Common/Core/Constants.swift#L16) file to see which versions are supported. +Backports are available via [this tap](https://github.com/shivammathur/homebrew-php). For more information about those backports, please see the next FAQ entry. + + + +
+How do I install additional versions of PHP, including legacy versions? + +Assuming you have installed the `php` formula, the latest stable version of PHP is installed. At the time of writing, this is PHP 8.2. + +You can install other supported versions of PHP out of the box, so `php@8.0` and `php@8.1` at the time of writing. + +If you wish to install older (officially unsupported) versions of PHP for local use, you can do so by using [Shivam Mathur's tap](https://github.com/shivammathur/homebrew-php): + +```sh +brew tap shivammathur/php +``` + +You may find that this tap is already in use: if you've used Valet before, it automatically uses this tap for legacy versions of PHP. + +You can then install those older versions: + +```sh +brew install php@7.0 +brew install php@7.1 +... +``` + +**Always make sure to restart PHP Monitor after installing or upgrading PHP versions!** + +> *Note*: Using this tap may cause [temporary alias conflicts](https://github.com/nicoverbruggen/phpmon/issues/54#issuecomment-979789724) while the core tap alias and the tap's alias refer to a different version of PHP, but this is generally speaking a minor inconvenience, since this normally only applies when a new PHP version releases.