Skip to content

Instantly share code, notes, and snippets.

@vwedesam
Last active April 27, 2023 17:47
Show Gist options
  • Save vwedesam/c3fa476ac9f616b6c4144e1876635b0c to your computer and use it in GitHub Desktop.
Save vwedesam/c3fa476ac9f616b6c4144e1876635b0c to your computer and use it in GitHub Desktop.
Install disbaled PHP version on mac-os

Install disbaled PHP version on Mac OS

Error: php@7... has been disabled because it is a versioned formula!

METHODS

Method 1

You can only install supported versions of PHP with brew. However, there is the tap shivammathur/php which can be used to install unsupported version of PHP.

    brew tap shivammathur/php
    brew install shivammathur/php/php@7.3
    brew link php@7.3

The first step only needs to be done once. After adding the tap, you can install PHP version

Method 2

You can also edit the formula and re-enable it. These steps worked for me:

    brew edit php@7.4
    # Look for disable! date: "2022-11-28", because: :versioned_formula. Change 2022 to 2023
    brew install php@7.4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment