2

I'm used to installing php72 and php's required extensions using homebrew-php for.. homebrew on MacOS High Sierra :)

now when I go to https://github.com/Homebrew/homebrew-php it says that it's deprecated and it was removed or merged with core. i can see that brew has php package but no way to install more extensions.

is there a different repository I need to tap now ?

in general... i need the mysql, intl and opcache extensions which do not come by default. what do I do ?

ufk
  • 30,912
  • 70
  • 235
  • 386
  • you can directly install php extensions with brew. What are you trying to install? – Suraj Rao Apr 19 '18 at 06:37
  • According to docs, it has been merged with Homebrew-core. You should upgrade brew and install php Here is a good snippet https://gist.github.com/shashankmehta/6ff13acd60f449eea6311cba4aae900ahttps://gist.github.com/shashankmehta/6ff13acd60f449eea6311cba4aae900a . Then install extension with brew, or without it. – Nikola Kirincic Apr 19 '18 at 06:41
  • 2
    What I did, I cleared old versions, untapped 3rd party taps and installed just `brew install php` and that gave me PHP 7.2. Since I am still actively using PHP5.6, I installed also `brew install php@5.6`, but currently I am having some trouble with Valet, when I want to use it with 5.6 instead of 7.2. – Rozkalns Apr 19 '18 at 07:38
  • @Rozkalns - that was the way to go :) homebrew's php package contains most of the extensions I needed.. and I installed the missing ones with pecl. please post as answer so i'll accept it :) – ufk Apr 28 '18 at 09:47
  • I think my answer here explains it pretty well. It's not too tough. https://stackoverflow.com/a/50529784/2836621 – Mark Setchell May 25 '18 at 13:14

2 Answers2

1

I ran into some major roadblocks trying to stay with homebrew for php56 on MacOS High Sierra. It was forcing me to use Pear/Pecl to install my dependencies like dblib, memcached, mcrypt, etc. When I tried to get memcached setup it only had a version available for php7x. In disappointment I threw up my hands and removed homebrew from my system and installed macports. I was able to get all of my subtle dependencies working. It wasn't a pleasant path, but it's better than nothing.

I hope this helps.

noctufaber
  • 764
  • 2
  • 10
  • 24
0

I didn't need to replace homebrew with macports to install missing extensions. I personally prefer to stick to homebrew if possible.

PHP package for homebrew comes with most required extension. I used pecl to install any other extension I needed.

thanks and have fun :)

ufk
  • 30,912
  • 70
  • 235
  • 386