Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Andy Grunwald:
Migrate your local PHP 7.2 setup to Homebrew v1.5.*
May 01, 2018 @ 15:25:51

The OS X users out there are no doubt familiar with the Homebrew package management system that makes it easier to install and update software on your system. This includes PHP and several other related pieces of software. In this post to his site Andy Grunwald shows you how to use Homebrew to migrate your local PHP setup up to PHP 7.2.

Last week, Hans Puac, a colleague of mine, wrote a small guide into our internal company chat on how to migrate your local PHP environment on macOS to the new Homebrew version 1.5.*. The guide helped a lot of other engineers inside trivago. I thought it might help more people from the internet. I asked Hans if I am allowed to share it, and he approved. So kudos belongs to him. Here we go:

With Homebrew 1.5.0 the tap homebrew/php got deprecated. They migrated it to homebrew/core, but this is changing the installation process completely.

He then walks through the steps (complete with the commands required) to make the update happen:

  1. Cleanup (the currently installed PHP packages)
  2. Update [Homebrew]
  3. Install PHP (7.2)
  4. Verify the installation
  5. Install extensions
  6. Cleanup

He also includes a few tips to help you troubleshoot some of the common problems including wrong versions of PHP, wrong php.ini being used and a "module already loaded" issue.

tagged: php72 homebrew osx migrate tutorial process package

Link: https://andygrunwald.com/blog/migrate-your-local-php-7.2-setup-to-homebrew-v1.5./


Trending Topics: