Valet-plus: Homebrew/php is deprecated in favor of homebrew/core

Created on 2 Apr 2018  路  63Comments  路  Source: weprovide/valet-plus

What is the problem?
Homebrew/php is deprecated in favor of homebrew/core which now has support for php formulae. Homebrew/core supports the following php versions: 5.6, 7.0, 7.1, 7.2. When people use some valet or brew commands which trigger an update they will brick their valet+ installation. Due to PHP not being able to find the missing extensions which are now managed by PECL.

The new homebrew/core php packages have several extensions prepackaged like: mcrypt and intl. Packages should now be managed using the PHP package manager PECL.

What to do?

  • [X] Fix Brew.php to support the new php@{version} formulae
  • [X] Fix PhpFpm.php to support new php@{version} formulae
  • [X] Refactor package management from homebrew/php to PECL
  • [X] Fix xdebug on/off switch
  • [X] Fix Ioncube loader extension (PhpFpm --> PECL) 5.6, 7.0, 7.1, 7.2
  • [x] Provide user friendly switch from old php installation
  • [X] Fix n98-magerun, n98-magerun2 and drush. Custom Binary Manager.

Pecl manager supported versions

  • [X] PHP 7.2 support: apcu, intl, mcrypt, opcache, geoip
  • [X] PHP 7.1 support: apcu, intl, mcrypt, opcache, geoip
  • [X] PHP 7.0 support: apcu, intl, mcrypt, opcache, geoip
  • [X] PHP 5.6 support: apcu, intl, mcrypt, opcache, geoip

Current progress can be followed at https://github.com/tamtamnl/valet-plus/tree/hotfix/homebrew-core-php and will soon be followed up by a PR for the community to judge.

Edit: Merged.

Most helpful comment

How do I unbrick my PHP installation for Valet+ to work?
P.S: We will add this to Valet+ soon, so when someone uses valet use {version} valet install valet fix it will trigger the fix automatically.

  1. Make sure all old PHP homebrew/php packages are removed:
brew list | grep php56- | xargs brew uninstall
brew list | grep php70- | xargs brew uninstall
brew list | grep php71- | xargs brew uninstall
brew list | grep php72- | xargs brew uninstall
brew list | grep n98-mag | xargs brew uninstall
brew list | grep drush | xargs brew uninstall
brew uninstall php56
brew uninstall php70
brew uninstall php71
brew uninstall php72
brew untap homebrew/php

P.S: Do not uninstall php71 for now. n98magerun2 has a dependency for it. Added new implementation in merged PR. Binaries are now downloaded by the binary manager.

  1. Install Valet+ default php version:
brew install [email protected]
brew upgrade [email protected]
brew link [email protected] --overwrite --force
  1. Restart the terminal.

  2. Disable old extension configuration from homebrew/php:

mv /usr/local/etc/php/5.6/conf.d/ext-apcu.ini /usr/local/etc/php/5.6/conf.d/ext-apcu.ini.disabled
mv /usr/local/etc/php/5.6/conf.d/ext-geoip.ini /usr/local/etc/php/5.6/conf.d/ext-geoip.ini.disabled
mv /usr/local/etc/php/5.6/conf.d/ext-intl.ini /usr/local/etc/php/5.6/conf.d/ext-intl.ini.disabled
mv /usr/local/etc/php/5.6/conf.d/ext-mcrypt.ini /usr/local/etc/php/5.6/conf.d/ext-mcrypt.ini.disabled

mv /usr/local/etc/php/7.0/conf.d/ext-apcu.ini /usr/local/etc/php/7.0/conf.d/ext-apcu.ini.disabled
mv /usr/local/etc/php/7.0/conf.d/ext-geoip.ini /usr/local/etc/php/7.0/conf.d/ext-geoip.ini.disabled
mv /usr/local/etc/php/7.0/conf.d/ext-intl.ini /usr/local/etc/php/7.0/conf.d/ext-intl.ini.disabled
mv /usr/local/etc/php/7.0/conf.d/ext-mcrypt.ini /usr/local/etc/php/7.0/conf.d/ext-mcrypt.ini.disabled

mv /usr/local/etc/php/7.1/conf.d/ext-apcu.ini /usr/local/etc/php/7.1/conf.d/ext-apcu.ini.disabled
mv /usr/local/etc/php/7.1/conf.d/ext-geoip.ini /usr/local/etc/php/7.1/conf.d/ext-geoip.ini.disabled
mv /usr/local/etc/php/7.1/conf.d/ext-intl.ini /usr/local/etc/php/7.1/conf.d/ext-intl.ini.disabled
mv /usr/local/etc/php/7.1/conf.d/ext-mcrypt.ini /usr/local/etc/php/7.1/conf.d/ext-mcrypt.ini.disabled

mv /usr/local/etc/php/7.2/conf.d/ext-apcu.ini /usr/local/etc/php/7.2/conf.d/ext-apcu.ini.disabled
mv /usr/local/etc/php/7.2/conf.d/ext-geoip.ini /usr/local/etc/php/7.2/conf.d/ext-geoip.ini.disabled
mv /usr/local/etc/php/7.2/conf.d/ext-intl.ini /usr/local/etc/php/7.2/conf.d/ext-intl.ini.disabled
mv /usr/local/etc/php/7.2/conf.d/ext-mcrypt.ini /usr/local/etc/php/7.2/conf.d/ext-mcrypt.ini.disabled

P.S: To check if you removed all missing extensions you can do php -v and see if it throws any warning.

5. Add the repository by your prefered method. For example as explained in https://github.com/weprovide/valet-plus/issues/127#issuecomment-378900526. P.S: dept/valet-plus is not a supported repository and I would advice to switch back as soon as the PR is merged. MERGED in version 1.0.12.

6. When the repository is installed, use Valet+ like you normally would. Start with valet install. Use valet like you normally would.

Edit: After merge changes.

@Tjitse-E Thanks for providing feedback good to know it works. I shall continue to create functionality for the above. Yes the PECL extension management is still a bit fragile. I intend to tackle this in another issue/pr when this one is merged.

All 63 comments

Thank you for your work so far. We are also trying to push out a fix asap for this issue - your work so far is really appreciated!

Brew has changed its stance regarding PHP 7.0 and will now support PHP 7.0. See: https://github.com/Homebrew/homebrew-core/pull/26026#event-1553827401

@samgranger Is there someway we can contribute together? Without making each others work obsolete? Are there any communication channels for contributors?

@Neodork https://gitter.im/ maybe?

@martisj Yeah if the owners of the repository could set that up, I'm all down with gitter.

Setting up gitter now.

We have all bricked our Valet+ installations on our team this morning because of this and our development was halted for a couple of hours. Is there an ETA for a fix?

@ObSeSSeN did you already fix your local installation? I've switched to the original Laravel/Valet, reinstalled Valet and linked [email protected] with brew link [email protected] --force --overwrite and after a restart i've got Valet working again with Magento 2.

@Tjitse-E yes but we used MAMP because we need to switch between PHP 5.6 and 7.1 on a regular basis. We will definitely switch back to Valet+ as soon as a fix is released, it is, in my opinion, a faster and more lightweight solution.

ObSeSSeN My goal is to finish the new package manager within the next 48 hours. Once completed valet+ should be operational again for non bricked php installations. I am currently testing the new Pecl extension manager. The current support is:

  • PHP 7.2: xdebug, apcu/apc, geoip, opcache.
  • PHP 7.1: xdebug, apcu/apc, geoip, opcache.
  • PHP 7.0: Not implemented yet.
  • PHP 5.6: not supported, apcu implementation not finished.

@Neodork that is excellent news, I can't wait! Thank you for all your effort!

@Neodork I now already use your latest hotfix version and so far it works great when switching between PHP 5.6 and 7.1.

@ObSeSSeN Great, nice to have some input on the latest hotfix version. Let us know here if you encounter any problems regarding switching/extension management. @samgranger mentioned there were still some issues regarding PHP 7.2 so I will be looking into that.

@ObSeSSeN could you tell me how were you able to use the tamtamnl's repo to install valet-plus? I'm trying to do so, but nothing works. I'm thinking to go through the commits and revise the files of a new installation of weprovide/valet-plus one by one. Did you do it in a more efficient way?

@navidfalla I had Valet+ installed globally by Composer, then I went into the ~/.composer/global folder and replaced the valet-plus folder by cloning a new one from the tamtamnl/valet-plus repo. I then moved into the valet-plus folder and checked out the hotfix/homebrew-core-php branch. The last step was to do a composer install inside the same folder.

Quick and dirty I know but it will do until the PR is merged.

@Neodork I haven't tested this thoroughly but I think there is a problem when switching PHP versions (eg. from 5.6 to 7.1) in that the Nginx still uses the 7.0 version. I did the switch and in the console the php -v command outputs the 7.1.16 version from brew but if I output phpinfo() on my website it says that the version is 7.0.27.

I fixed it by restarting my computer. Somehow somewhere there was a php70-fpm socket still running - even thou I removed all PHP versions before trying the hotfix branch.

@navidfalla You can change your global composer file to use the hotfix branch for now as a "cleaner" way to try it, your composer.json file should look something like this:

{
    "require": {
        "weprovide/valet-plus": "dev-hotfix/homebrew-core-php"
    },
    "repositories": [
        {
            "type": "vcs",
            "url": "https://github.com/tamtamnl/valet-plus"
        }   
    ]
}

I haven't tested it but it should work.

did not work :/
2018-04-05_10-23-38

@code2prog First you need to remove your weprovide/valet-plus from the composer.json and then do composer global update.

Then add the lines as mentioned by @jahvi however you need to change a small typo:

{
    "require": {
        "dept/valet-plus": "dev-hotfix/homebrew-core-php"
    },
    "repositories": [
        {
            "type": "vcs",
            "url": "https://github.com/tamtamnl/valet-plus"
        }   
    ]
}

And do composer global update again.

@Neodork i've just tested your fork (branch dev-hotfix/homebrew-core-php) and Valet is working correctly again, including Xdebug. I did had to remove my old PECL folder manually, also a reboot of my mac was needed to get things running again. Many thanks!

How do I unbrick my PHP installation for Valet+ to work?
P.S: We will add this to Valet+ soon, so when someone uses valet use {version} valet install valet fix it will trigger the fix automatically.

  1. Make sure all old PHP homebrew/php packages are removed:
brew list | grep php56- | xargs brew uninstall
brew list | grep php70- | xargs brew uninstall
brew list | grep php71- | xargs brew uninstall
brew list | grep php72- | xargs brew uninstall
brew list | grep n98-mag | xargs brew uninstall
brew list | grep drush | xargs brew uninstall
brew uninstall php56
brew uninstall php70
brew uninstall php71
brew uninstall php72
brew untap homebrew/php

P.S: Do not uninstall php71 for now. n98magerun2 has a dependency for it. Added new implementation in merged PR. Binaries are now downloaded by the binary manager.

  1. Install Valet+ default php version:
brew install [email protected]
brew upgrade [email protected]
brew link [email protected] --overwrite --force
  1. Restart the terminal.

  2. Disable old extension configuration from homebrew/php:

mv /usr/local/etc/php/5.6/conf.d/ext-apcu.ini /usr/local/etc/php/5.6/conf.d/ext-apcu.ini.disabled
mv /usr/local/etc/php/5.6/conf.d/ext-geoip.ini /usr/local/etc/php/5.6/conf.d/ext-geoip.ini.disabled
mv /usr/local/etc/php/5.6/conf.d/ext-intl.ini /usr/local/etc/php/5.6/conf.d/ext-intl.ini.disabled
mv /usr/local/etc/php/5.6/conf.d/ext-mcrypt.ini /usr/local/etc/php/5.6/conf.d/ext-mcrypt.ini.disabled

mv /usr/local/etc/php/7.0/conf.d/ext-apcu.ini /usr/local/etc/php/7.0/conf.d/ext-apcu.ini.disabled
mv /usr/local/etc/php/7.0/conf.d/ext-geoip.ini /usr/local/etc/php/7.0/conf.d/ext-geoip.ini.disabled
mv /usr/local/etc/php/7.0/conf.d/ext-intl.ini /usr/local/etc/php/7.0/conf.d/ext-intl.ini.disabled
mv /usr/local/etc/php/7.0/conf.d/ext-mcrypt.ini /usr/local/etc/php/7.0/conf.d/ext-mcrypt.ini.disabled

mv /usr/local/etc/php/7.1/conf.d/ext-apcu.ini /usr/local/etc/php/7.1/conf.d/ext-apcu.ini.disabled
mv /usr/local/etc/php/7.1/conf.d/ext-geoip.ini /usr/local/etc/php/7.1/conf.d/ext-geoip.ini.disabled
mv /usr/local/etc/php/7.1/conf.d/ext-intl.ini /usr/local/etc/php/7.1/conf.d/ext-intl.ini.disabled
mv /usr/local/etc/php/7.1/conf.d/ext-mcrypt.ini /usr/local/etc/php/7.1/conf.d/ext-mcrypt.ini.disabled

mv /usr/local/etc/php/7.2/conf.d/ext-apcu.ini /usr/local/etc/php/7.2/conf.d/ext-apcu.ini.disabled
mv /usr/local/etc/php/7.2/conf.d/ext-geoip.ini /usr/local/etc/php/7.2/conf.d/ext-geoip.ini.disabled
mv /usr/local/etc/php/7.2/conf.d/ext-intl.ini /usr/local/etc/php/7.2/conf.d/ext-intl.ini.disabled
mv /usr/local/etc/php/7.2/conf.d/ext-mcrypt.ini /usr/local/etc/php/7.2/conf.d/ext-mcrypt.ini.disabled

P.S: To check if you removed all missing extensions you can do php -v and see if it throws any warning.

5. Add the repository by your prefered method. For example as explained in https://github.com/weprovide/valet-plus/issues/127#issuecomment-378900526. P.S: dept/valet-plus is not a supported repository and I would advice to switch back as soon as the PR is merged. MERGED in version 1.0.12.

6. When the repository is installed, use Valet+ like you normally would. Start with valet install. Use valet like you normally would.

Edit: After merge changes.

@Tjitse-E Thanks for providing feedback good to know it works. I shall continue to create functionality for the above. Yes the PECL extension management is still a bit fragile. I intend to tackle this in another issue/pr when this one is merged.

Just thinking out loud here, would it be prettier to add to valet install instead of switch/fix?

@Neodork Thanks I should have tested it before commenting 馃槄

Any reason why the package name should be dept/valet-plus instead of weprovide/valet-plus?

@samgranger Agreed, will add check into valet install (PhpFpm#install()) instead. It fits better since users should use valet install after switching versions.

@jahvi That is because our company name is dept (even though github says tamtamnl, we actually renamed to dept the 3rd of april). The default branch of the repository is master-dept, which is a branch with changes only for usage within dept. Because the default branch is master-dept and not master the repository will make up it's composer file from the master-dept branch when linking directly from github as mentioned in https://github.com/weprovide/valet-plus/issues/127#issuecomment-378900526.

We do this so we can merge the upstream of Valet+ to the master branch. We then review the changes made by Valet+. If approved we merge master to dept-master so our colleagues can make use of the updated Valet+. As for branching for new features/hotfixes, unless the feature is specifically for master-dept, we branch off from the master branch which is identical to the Valet+ master branch. Then when we're certain of our implementation we can PR back to weprovide/valet-plus without adding changes that are specific to the needs of dept.

@Neodork Ah that makes sense, thanks!

Hi,

Im trying to install from zero valet+.

First i've installed php 7.1.16 from homebrew/core, then I follow #127 comment.

When I try to install valet+ throws this error: "Could not find installation path for: apc"

php -v output:

PHP 7.1.16 (cli) (built: Mar 31 2018 02:28:54) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2018 Zend Technologies
    with Xdebug v2.6.0, Copyright (c) 2002-2018, by Derick Rethans
    with Zend OPcache v7.1.16, Copyright (c) 1999-2018, by Zend Technologies

php -m

[PHP Modules]
apcu
bcmath
bz2
calendar
Core
ctype
...cutted for readability...
[Zend Modules]
Xdebug
Zend OPcache

imagen

Do you know what's wrong?

P.S: To help someone, you can add "brew tap kyslik/php" to work as before homebrew/php.

@Tjitse-E What folder did you have to remove when you got rid of PECL?

@davidstillson, I think it was /usr/local/share/pear, but I'm not 100% sure. It contained only two empty folders in my case, so it was safe to delete. Maybe you can try renaming it first to see if it works? I had the same error as @markitosgv ('Could not find installation path for ...)

Just wanted to say thanks for this fix and your work on it. For now, the fix from @Neodork works for me.

I saw this package after I got this homebrew/core thing changed, and I do wish they don't do this kind of thing again, enough said. I would love to see this merge to weprovide/valet-plus soon. So maybe monday could jump start things each of our dev-opts life again. Currently using Laravel's valet, and I was able to document my installation script.

Hi guys,

I'm trying everything to make my Valet+ work for 2 days now but it doesn't want to. I tried @Neodork fix but I have the same problem as @markitosgv with another module :

"Could not find installation path for: geoip"

I have the same version of PHP with the same modules, except geoip. So I try to install it through PECL manually using pecl install geoip but I have this error :

ERROR: '/private/tmp/pear/temp/geoip/configure --with-php-config=/usr/local/opt/[email protected]/bin/php-config' failed

Any tips to make it work please ? Thanks for your time.

@Deejay-Ste I was able to correct this by manually installing the packages with PECL and then doing another pass at valet install

pecl install geoip
I got a nasty error about it failing, but then I tried valet install again and I was golden.

@ArjenMiedema My pleasure, the community has been very positive! I appreciate all the kind words from everyone that has shown their appreciation for the upcoming PR.

@ other comments, I will look through the comments as soon as I have some more time. Today I couldn't find any. Good news is I have a WIP implementation for custom PECL packages like Ioncube. I am currently working on the install/uninstall. I hope to have the PR ready for review on monday.

Image of Yaktocat

For me, when execute valet install return:

image

@markitosgv That's an error when PECL couldn't install apcu_bc. Apparently there is a problem when running pecl install apcu_bc. You could run it manually to get more information on the error. I will look into improving the indescriptive error messages.

@Deejay-Ste Same as above and as @davidstillson mentions pecl install geoip is the command to check what goes wrong in your installation.

@MaxSouza @george-kar I've noticed that that n98magerun packages were part of homebrew/php and they will now need to be installed using a different method. I think this is also the case in https://github.com/weprovide/valet-plus/issues/126.


I've finished up the ioncube loader implementation for all PHP versions supported by valet+. I will now look into the fix command and improving the error logging. And then I will have to devise some acceptable way to install custom phar files that are not supported by brew @samgranger any thoughts?

@jahvi Since you mentioned that ioncube installation didn't work in https://github.com/weprovide/valet-plus/issues/121. Could you test the new implementation and see if this works for you?

@Neodork Thanks for all the great work on this, btw. You are literally saving my productivity. :-)

@Neodork Thanks for all the great work.

Hi @Neodork, thanks for all the work.

I've noticed that that n98magerun packages were part of homebrew/php and they will now need to be installed using a different method

This means that we should try and install n98magerun before valet+, and then the install will complete? Do you happen to know how this could be done?

Thanks a lot!

@davidstillson @MaxSouza @amcastror As always, my pleasure!

@amcastror If you download the latest version from my hotfix (as mentioned in https://github.com/weprovide/valet-plus/issues/127#issuecomment-378900526) the n98-magerun devtools will be removed from the valet install command. You will then be able to do valet install again without getting an error about it.

@Neodork I can confirm Ioncube is working for me now, thanks!

Running pecl channel-update pecl.php.net probably solves most errors related to apc.

In some scenarios you need to run brew install geoip before you can run pecl install geoip.

People getting phpize errors, please run brew install autoconf

@jahvi Thanks for checking that for me, I appreciate your swift response.

Thanks @Neodork @davidstillson and @samgranger ! You saved the day !

As mentioned in gitter, it looks like we cannot run the fix function during valet install due to commands being run under sudo as defined in ./valet

Maybe we can still do the check in valet install & throw an error requesting the user to run valet fix if this is required.

What is the status on this? Brew upgrade broke all dev machines here!

Regarding the procss: wasn't it possible to view this change coming by watching beta versions of brew? I know "we are all hobbyists etc..." but how could this come in that surprising way??? This is not meant as a rant but I would like to know what could be done in future by less active and more 'consumers' of this project to prevent such a thing ever happening again.

BTW the workaround in this comment
https://github.com/weprovide/valet-plus/issues/127#issuecomment-378870073
now requires a github oauth token because of API rate limit.

The procedure described here does not work, I get on ALL browser requests to any valet site:

Fatal error: Call to undefined function apcu_fetch() in /Users/xyz/.composer/vendor/dept/valet-plus/server.php on line 37

valetplus is still broken.

@wowcut Officially this is just a fork of laravel/valet so I would've expected laravel/valet to have fix ready. That was not the case. But I had need for this fix myself in the easter weekend (was going to work on some sites) so started myself. There were no existing PR's or assigned issues at the time. I am unsure what the upstream is doing about it but I am keeping an eye on: https://github.com/laravel/valet/pull/561 since that is where they are working on the new version management. And we'll likely need to merge their changes soon.

Valet+ should've reacted to the changes of laravel/valet but since there was no notion of it, the contributors missed that, it happens. We're doing our best to restore functionality to Valet+ as soon as possible. Today @samgranger did some tests with the current hotfix and got back to me with some feedback. Tonight I will be looking into custom binaries like n98-magerun and drush. Once I've finished the custom binaries I can format all code and submit the PR.

Fatal error: Call to undefined function apcu_fetch() in /Users/xyz/.composer/vendor/dept/valet-plus/server.php on line 37 You likely didn't install the new config with valet install. In z-performance.ini APCu is disabled. You need to atleast enable the CLI version and then restart the entire environment preferably with valet restart.

Edit: Part about Valet+

BTW: why does happen so much in server.php? Wouldn't it be wise to make these install scripts just add another vhost like configured and not intercept each and every request with server.php?

E.g. why is server.php using apcu_fetch() for each and every request?

I really would like to read more about the reasoning behind server.php - this is not the first time everything I wanted to do today is blocked because of some issue with this server.php script and it looks to me like it tries to do too much.

server.php is there because it provides a way to manage the location of the webroot using a driver based system. You can see the history of it on laravel/valet here https://github.com/laravel/valet/commits/master?after=74e203e37b9549b364feda1920e91e3156f38ad9+34&path%5B%5D=server.php

I would say the apc cache was added to improve performance. Here is the commit when it was added https://github.com/weprovide/valet-plus/commit/72900d8cf19f7cf982dd00559b918b3145e68fc3#diff-c7b36e05b81cc4174a915d1bd510c758 .

I have seen in comments that removing it can slow the system down quite a bit.

Following the directions in NeoDork's post above https://github.com/weprovide/valet-plus/issues/127#issuecomment-378914908

And the added advice to install pecl libraries manually https://github.com/weprovide/valet-plus/issues/127#issuecomment-379549204 helped me on Friday, but coming in today I'm getting mysterious "Did not get front controller from driver." errors. So I'm diving back in.

Did you know when we will have a polished Pull request. I see there has been much progress over the weekend.

Thanks for the work on this.

Just rebased the PR and added binary management for n98-magerun, n98-magerun2 and drush launcher. Will now proceed to format the changes and rebase again with the upstream.

I think we can all say that we're very grateful for all the hard work @Neodork!

We have created a new release with your PR. Please run the following commands after upgrading to this new version: valet fix followed by valet install. Please create a new ticket for any issues you may encounter while upgrading.

Clean install still gives me problems :-(

valet install
Password:
[nginx] Stopping
[mysql] Stopping
[redis] Stopping
[devtools] Installing
[wp-cli] Installing
Error: homebrew/php was deprecated. This tap is now empty as all its formulae were migrated.
[n98-magerun] Installing
Error: homebrew/php was deprecated. This tap is now empty as all its formulae were migrated.
Error: No available formula with the name "n98-magerun" 
==> Searching for a previously deleted formula (in the last month)...
Warning: homebrew/core is shallow clone. To get complete history run:
  git -C "$(brew --repo homebrew/core)" fetch --unshallow

Error: No previously deleted formula found.
==> Searching local taps...
Error: No similarly named formulae found.
==> Searching taps on GitHub...
==> Searching for similarly named formulae...
==> Searching taps...
Error: No formulae found in taps.
In Brew.php line 117:

  Brew was unable to install [n98-magerun].  

install [--with-mariadb]

@allrude Please create a new ticket so we can help you there. But from the looks of it you're running an older version.

Pr is merged and has been deployed in the 1.0.12 release.

I tried version 1.0.13 today, but it didn't work flawlesly. I did not have a bricked installation.

So after updating to 1.0.13, I typed: valet fix

Removing all old php56- packages from homebrew/php tap
Removing all old php70- packages from homebrew/php tap
Uninstalling /usr/local/Cellar/php70-apcu/5.1.8... (23 files, 160.2KB)
Uninstalling /usr/local/Cellar/php70-geoip/1.1.1... (3 files, 28.6KB)
Uninstalling /usr/local/Cellar/php70-intl/7.0.27_24... (7 files, 503.7KB)
php70-intl 7.0.26_23, 7.0.26_22, 7.0.20_14, 7.0.22_17 4 are still installed.
Remove all versions with `brew uninstall --force php70-intl`.
Uninstalling /usr/local/Cellar/php70-mcrypt/7.0.20_12... (7 files, 146.4KB)
Uninstalling /usr/local/Cellar/php70-opcache/7.0.22_13... (7 files, 266.1KB)
Uninstalling /usr/local/Cellar/php70-xdebug/2.5.5... (4 files, 196.0KB)
Removing all old php71- packages from homebrew/php tap
Uninstalling /usr/local/Cellar/php71-apcu/5.1.8... (23 files, 160.4KB)
Uninstalling /usr/local/Cellar/php71-geoip/1.1.1... (3 files, 28.6KB)
Uninstalling /usr/local/Cellar/php71-imagick/3.4.3_6... (4 files, 335.7KB)
Uninstalling /usr/local/Cellar/php71-intl/7.1.14_25... (7 files, 543.6KB)
php71-intl 7.1.12_22, 7.1.12_23, 7.1.13_24 3 are still installed.
Remove all versions with `brew uninstall --force php71-intl`.
Uninstalling /usr/local/Cellar/php71-mcrypt/7.1.8_15... (7 files, 186.1KB)
Uninstalling /usr/local/Cellar/php71-opcache/7.1.8_13... (7 files, 459.5KB)
Uninstalling /usr/local/Cellar/php71-xdebug/2.6.0... (4 files, 225.6KB)
Removing all old php72- packages from homebrew/php tap
Removing all old n98-magerun packages from homebrew/php tap
Uninstalling /usr/local/Cellar/n98-magerun/1.97.27... (5 files, 3.8MB)
Uninstalling /usr/local/Cellar/n98-magerun2/1.5.0... (5 files, 4.4MB)
Removing drush package from homebrew/php tap
[php5.6] Disabling modules: apcu, intl, mcrypt
[php7.0] Disabling modules: apcu, intl, mcrypt
[php7.1] Disabling modules: apcu, intl, mcrypt
[php7.2] Disabling modules: apcu, intl, mcrypt
Trying to remove php56...
Error: No such keg: /usr/local/Cellar/php56
Trying to remove php70...
Error: Refusing to uninstall /usr/local/Cellar/php70/7.0.27_19
because it is required by php70-intl 7.0.26_23, php70-intl 7.0.26_22, php70-intl 7.0.20_14, php70-intl 7.0.22_17, which are currently installed.
You can override this and force removal with:
  brew uninstall --ignore-dependencies php70
Trying to remove php71...
Error: Refusing to uninstall /usr/local/Cellar/php71/7.1.14_25
because it is required by php71-intl 7.1.12_22, php71-intl 7.1.12_23, php71-intl 7.1.13_24, which are currently installed.
You can override this and force removal with:
  brew uninstall --ignore-dependencies php71
Trying to remove php72...
Error: No such keg: /usr/local/Cellar/php
Installing and linking new PHP homebrew/core version.
Error: No such keg: /usr/local/Cellar/[email protected]
Updating Homebrew...
Warning: [email protected] is outdated!
To avoid broken installations, as soon as possible please run:
  brew upgrade
Or, if you're OK with a less reliable fix:
  brew upgrade [email protected]
Warning: [email protected] is outdated!
To avoid broken installations, as soon as possible please run:
  brew upgrade
Or, if you're OK with a less reliable fix:
  brew upgrade [email protected]
==> Auto-updated Homebrew!
Updated 3 taps (homebrew/core, homebrew/php, caskroom/cask).
==> New Formulae
annie
apache-arrow-glib
aws-es-proxy
composer
cquery
flintrock
goto
gr-osmosdr
hcloud
jrtplib
jsonrpc-glib
jthread
latexdiff
libdazzle
meson-internal
mint
netdata
parallelstl
php-code-sniffer
php-cs-fixer
phplint
phpunit
qsoas
rtptools
scrcpy
ssh-permit-a38
template-glib
tox
trezor-agent
util-linux
==> Updated Formulae
abcmidi
abnfgen
adwaita-icon-theme
agda
agedu
allegro
alot
amber
ammonite-repl
angular-cli
anjuta
ansible
ant
apache-arrow
apache-geode
apibuilder-cli
apktool
arangodb
argus-clients
armor
artifactory
arx
asciinema
asio
at-spi2-atk
at-spi2-core
atk
atkmm
ats2-postiats
audacious
autopep8
awf
aws-sdk-cpp
awscli
azure-cli
babl
ballerina
baobab
basex
bazel
bcftools
bcpp
bedops
bettercap
biogeme
bit
bitcoin
bitrise
bokken
botan
braid
brotli
buku
byteman
bzt
c14-cli
cabal-install
caddy
caf
calicoctl
ccache
ceres-solver
certbot
chakra
chamber
chapel
checkstyle
chromedriver
chronograf
cimg
clamav
clearlooks-phenix
cliclick
clinfo
closure-compiler
clutter-gst
cmake
cnats
cockroach
cocoapods
coffeescript
collectd
conan
conjure-up
container-diff
convmv
convox
corebird
coreos-ct
couchdb
cppcheck
cryptopp
czmq
darcs
dartsim
davmail
dbhash
dcm2niix
dcos-cli
ddgr
dependency-check
dhall-json
di
diff-pdf
diffoscope
diffuse
django-completion
dnscrypt-proxy
docfx
docker
docker-completion
docker-compose
docker-compose-completion
doctl
dovecot
dscanner
dspdfviewer
duc
duck
dwdiff
dynamips
e2fsprogs
easy-tag
efl
eiffelstudio
ejabberd
embulk
erlang
erlang@19
etcd
evince
exomizer
exploitdb
eye-d3
faas-cli
fades
fail2ban
fceux
fd
fdroidserver
ffmbc
fibjs
file-roller
firebase-cli
fits
flatbuffers
flawfinder
flow
fluent-bit
fn
fobis
folly
fontforge
fonttools
fq
freeciv
freeling
freetds
frege
fribidi
frugal
fuse-emulator
futhark
g3log
gabedit
ganglia
gbdfed
gcab
gdal
gdcm
gdk-pixbuf
gdmap
geckodriver
gedit
geeqie
gegl
genometools
gerbv
get-flash-videos
get_iplayer
geth
getmail
ghex
ghostscript
git
git-annex
git-ftp
git-town
gitbucket
gitfs
gitg
gitlab-runner
gitless
gjs
glade
glib
glibmm
gmt
gmt@4
gnatsd
gnome-autoar
gnome-builder
gnome-recipes
gnome-themes-standard
gnu-sed
gnumeric
gnupg
go
go-jira
[email protected]
gobby
gobject-introspection
godep
goenv
goffice
gom
goocanvas
google-benchmark
gosu
gpa
gpredict
gqview
grafana
grails
grakn
graphene
grip
gron
groonga
groovyserv
grpc
grsync
gsmartcontrol
gsoap
gspell
gssdp
gst-editing-services
gst-libav
gst-plugins-bad
gst-plugins-good
gst-plugins-ugly
gst-python
gstreamermm
gtk-chtheme
gtk-doc
gtk-engines
gtk-gnutella
gtk-murrine-engine
gtk-vnc
gtkdatabox
gtkextra
gtkmm
gtkmm3
gtksourceview
gtksourceview3
gtksourceview@4
gtksourceviewmm
gtksourceviewmm3
gtkspell3
gucharmap
gupnp
gupnp-av
gupnp-tools
gutenberg
gwyddion
hadolint
handbrake
haproxy
harfbuzz
headphones
heroku
hfstospell
hledger
hlint
homebank
htmldoc
htop
htslib
http-parser
httpd
hugo
hwloc
i2p
i3
i3status
icu4c
imagemagick
imagemagick@6
influxdb
internetarchive
ipfs
ipython
ipython@5
ircd-hybrid
jadx
jbig2enc
jena
jenkins
jenkins-job-builder
jenkins-lts
jhipster
joplin
jpegoptim
json-glib
juju
kedge
klavaro
knot
knot-resolver
kobalt
kompose
kops
kotlin
kubectx
kubeless
kubernetes-cli
lablgtk
languagetool
lasi
laszip
lbdb
lean-cli
libatomic_ops
libbi
libcdr
libcouchbase
libdill
libdvdcss
libepoxy
libfreehand
libgit2
libgit2-glib
libglade
libglademm
libgnomecanvas
libgnomecanvasmm
libgweather
libhdhomerun
libhttpseverywhere
libidn
libinfinity
liblas
liblcf
libmpdclient
libmspub
libmtp
libnice
libosmium
libphonenumber
libqalculate
librdkafka
librealsense
libressl
librsvg
libsecret
libsoup
libspectre
libswiften
libtensorflow
libucl
libusb
libuv
libvirt
libvisio
libzip
linkerd
lldpd
lmdb
lmod
logtalk
lolcat
lua
[email protected]
lxc
mackup
macvim
mame
mapnik
mapserver
mariadb
[email protected]
mat
maxwell
mbedtls
mdk
media-info
mediaconch
mednafen
memcached
mercurial
meson
metabase
mftrace
mill
mimic
minbif
minio-mc
miniupnpc
mitmproxy
mkvtoolnix
mm-common
modules
monetdb
mongo-c-driver
[email protected]
mpd
msitools
multimarkdown
mypy
nano
nativefier
natsError: [email protected] 7.1.14_25 is already installed
To upgrade to 7.1.16, run `brew upgrade [email protected]`
-streaming-server
ncmpc
ncmpcpp
nco
neo4j
neofetch
neomutt
newsboat
nginx
nicotine-plus
nifi
node
node-build
node@4
node@6
node@8
nodeenv
noti
notmuch
nss
ntl
ntopng
nuget
nuxeo
ocrmypdf
odpi
offlineimap
open-mpi
open-scene-graph
openimageio
openldap
openrct2
openshift-cli
openslide
openssh
openssl
[email protected]
openttd
openvdb
optipng
orocos-kdl
osm2pgrouting
osmium-tool
osquery
packer
packmol
paket
pandoc-crossref
pango
pangomm
paps
parallel
passenger
pazpar2
pcb
pcb2gcode
pdal
pdf2htmlex
pdf2svg
pdfgrep
pdfpc
pdfsandwich
pdftoipe
pdnsrec
percona-server-mongodb
percona-xtrabackup
pgcli
pgroonga
php
picard-tools
pick
pidgin
pioneers
pipenv
pipes-sh
planck
plantuml
plplot
pmd
points2grid
postgis
pqiv
pre-commit
prefixsuffix
presto
primesieve
proj
psqlodbc
pugixml
pycodestyle
pyenv
pygobject3
pygtk
pygtkglext
pygtksourceview
python
pytouhou
qbs
qpid-proton
qscintilla2
quicktype
raylib
re2
redis
reminiscence
robot-framework
rocksdb
rom-tools
rrdtool
ruby
ruby-build
[email protected]
[email protected]
rust
s-nail
s6
sagittarius-scheme
saltstack
samtools
sbcl
sbt
scipy
scm-manager
sdb
sdlpop
sile
simgrid
simple-tiles
singular
sip
siril
sjk
skaffold
skafos
skinny
slimerjs
solr
sops
sourcekitten
sourcery
sox
sphinx-doc
spigot
sqldiff
sqlite
sqlite-analyzer
sqlmap
srt
ssh-copy-id
sshuttle
stdman
stellar-core
submarine
suil
svgcleaner
swiftlint
sylpheed
syncthing
synfig
sysbench
sysdig
talloc
tarantool
tbb
tectonic
teleport
terminator
terraform
terragrunt
testssl
tinyxml2
tmuxinator-completion
todo-txt
tomcat
treefrog
twarc
txr
typescript
uhd
unbound
unixodbc
unrar
unyaffs
vala
vault
vim
[email protected]
vips
vis
vnu
vte
vte3
watch
webpack
wesnoth
widelands
wine
wireshark
xboard
xdot
xmount
xmrig
xrootd
xsane
xtensor
yash
yaws
yaz
yelp-tools
youtube-dl
yq
zabbix
zebra
zenity
zeromq
zim
zorba
zsh
zstd
==> Renamed Formulae
php56 -> [email protected]
php70 -> [email protected]
php71 -> [email protected]
==> Deleted Formulae
arm
==> Processing php71 formula rename to [email protected]
==> Unlinking php71
==> Moving php71 versions to /usr/local/Cellar/[email protected]
==> Relinking [email protected]
==> Processing php70 formula rename to [email protected]
==> Unlinking php70
==> Moving php70 versions to /usr/local/Cellar/[email protected]
==> Relinking [email protected]

Unlinking /usr/local/Cellar/[email protected]/7.1.14_25... 0 symlinks removed
Linking /usr/local/Cellar/[email protected]/7.1.14_25... 17 symlinks created

If you need to have this software first in your PATH instead consider running:
  echo 'export PATH="/usr/local/opt/[email protected]/bin:$PATH"' >> ~/.zshrc
  echo 'export PATH="/usr/local/opt/[email protected]/sbin:$PATH"' >> ~/.zshrc
[brew] untapping formulae homebrew/php
Untapping homebrew/php... (697 files, 4.6MB)
Untapped 0 formulae
Please check your linked php version, you might need to restart your terminal!
Linked PHP should be php 7.1:
Failed loading /usr/local/opt/php71-opcache/opcache.so:  dlopen(/usr/local/opt/php71-opcache/opcache.so, 9): image not found
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/opt/php71-apcu/apcu.so' - dlopen(/usr/local/opt/php71-apcu/apcu.so, 9): image not found in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/opt/php71-geoip/geoip.so' - dlopen(/usr/local/opt/php71-geoip/geoip.so, 9): image not found in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/opt/php71-imagick/imagick.so' - dlopen(/usr/local/opt/php71-imagick/imagick.so, 9): image not found in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/opt/php71-intl/intl.so' - dlopen(/usr/local/opt/php71-intl/intl.so, 9): image not found in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/opt/php71-mcrypt/mcrypt.so' - dlopen(/usr/local/opt/php71-mcrypt/mcrypt.so, 9): image not found in Unknown on line 0

Warning: PHP Startup: Unable to load dynamic library '/usr/local/opt/php71-apcu/apcu.so' - dlopen(/usr/local/opt/php71-apcu/apcu.so, 9): image not found in Unknown on line 0

Warning: PHP Startup: Unable to load dynamic library '/usr/local/opt/php71-geoip/geoip.so' - dlopen(/usr/local/opt/php71-geoip/geoip.so, 9): image not found in Unknown on line 0

Warning: PHP Startup: Unable to load dynamic library '/usr/local/opt/php71-imagick/imagick.so' - dlopen(/usr/local/opt/php71-imagick/imagick.so, 9): image not found in Unknown on line 0

Warning: PHP Startup: Unable to load dynamic library '/usr/local/opt/php71-intl/intl.so' - dlopen(/usr/local/opt/php71-intl/intl.so, 9): image not found in Unknown on line 0

Warning: PHP Startup: Unable to load dynamic library '/usr/local/opt/php71-mcrypt/mcrypt.so' - dlopen(/usr/local/opt/php71-mcrypt/mcrypt.so, 9): image not found in Unknown on line 0
PHP 7.1.14 (cli) (built: Feb  2 2018 08:42:59) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2018 Zend Technologies
------------------------------------------------------------

After this, I tried php -v:

~/.composer 禄 php -v                                                                                                                            
Failed loading /usr/local/opt/php71-opcache/opcache.so:  dlopen(/usr/local/opt/php71-opcache/opcache.so, 9): image not found
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/opt/php71-apcu/apcu.so' - dlopen(/usr/local/opt/php71-apcu/apcu.so, 9): image not found in Unknown on line 0

Warning: PHP Startup: Unable to load dynamic library '/usr/local/opt/php71-apcu/apcu.so' - dlopen(/usr/local/opt/php71-apcu/apcu.so, 9): image not found in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/opt/php71-geoip/geoip.so' - dlopen(/usr/local/opt/php71-geoip/geoip.so, 9): image not found in Unknown on line 0

Warning: PHP Startup: Unable to load dynamic library '/usr/local/opt/php71-geoip/geoip.so' - dlopen(/usr/local/opt/php71-geoip/geoip.so, 9): image not found in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/opt/php71-imagick/imagick.so' - dlopen(/usr/local/opt/php71-imagick/imagick.so, 9): image not found in Unknown on line 0

Warning: PHP Startup: Unable to load dynamic library '/usr/local/opt/php71-imagick/imagick.so' - dlopen(/usr/local/opt/php71-imagick/imagick.so, 9): image not found in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/opt/php71-intl/intl.so' - dlopen(/usr/local/opt/php71-intl/intl.so, 9): image not found in Unknown on line 0

Warning: PHP Startup: Unable to load dynamic library '/usr/local/opt/php71-intl/intl.so' - dlopen(/usr/local/opt/php71-intl/intl.so, 9): image not found in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/opt/php71-mcrypt/mcrypt.so' - dlopen(/usr/local/opt/php71-mcrypt/mcrypt.so, 9): image not found in Unknown on line 0

Warning: PHP Startup: Unable to load dynamic library '/usr/local/opt/php71-mcrypt/mcrypt.so' - dlopen(/usr/local/opt/php71-mcrypt/mcrypt.so, 9): image not found in Unknown on line 0
PHP 7.1.14 (cli) (built: Feb  2 2018 08:42:59) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2018 Zend Technologies
------------------------------------------------------------

I thought, perhaps a valet install will solve this:

~/.composer 禄 valet install                                                                                                                            
Failed loading /usr/local/opt/php71-opcache/opcache.so:  dlopen(/usr/local/opt/php71-opcache/opcache.so, 9): image not found
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/opt/php71-apcu/apcu.so' - dlopen(/usr/local/opt/php71-apcu/apcu.so, 9): image not found in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/opt/php71-geoip/geoip.so' - dlopen(/usr/local/opt/php71-geoip/geoip.so, 9): image not found in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/opt/php71-imagick/imagick.so' - dlopen(/usr/local/opt/php71-imagick/imagick.so, 9): image not found in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/opt/php71-intl/intl.so' - dlopen(/usr/local/opt/php71-intl/intl.so, 9): image not found in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/opt/php71-mcrypt/mcrypt.so' - dlopen(/usr/local/opt/php71-mcrypt/mcrypt.so, 9): image not found in Unknown on line 0
Failed loading /usr/local/opt/php71-opcache/opcache.so:  dlopen(/usr/local/opt/php71-opcache/opcache.so, 9): image not found
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/opt/php71-apcu/apcu.so' - dlopen(/usr/local/opt/php71-apcu/apcu.so, 9): image not found in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/opt/php71-geoip/geoip.so' - dlopen(/usr/local/opt/php71-geoip/geoip.so, 9): image not found in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/opt/php71-imagick/imagick.so' - dlopen(/usr/local/opt/php71-imagick/imagick.so, 9): image not found in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/opt/php71-intl/intl.so' - dlopen(/usr/local/opt/php71-intl/intl.so, 9): image not found in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/opt/php71-mcrypt/mcrypt.so' - dlopen(/usr/local/opt/php71-mcrypt/mcrypt.so, 9): image not found in Unknown on line 0
PHP Parse error:  syntax error, unexpected '' - dlopen(/usr/local/opt/php7' (T_CONSTANT_ENCAPSED_STRING), expecting ',' or ')' in Command line code on line 4
Password:
Failed loading /usr/local/opt/php71-opcache/opcache.so:  dlopen(/usr/local/opt/php71-opcache/opcache.so, 9): image not found
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/opt/php71-apcu/apcu.so' - dlopen(/usr/local/opt/php71-apcu/apcu.so, 9): image not found in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/opt/php71-geoip/geoip.so' - dlopen(/usr/local/opt/php71-geoip/geoip.so, 9): image not found in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/opt/php71-imagick/imagick.so' - dlopen(/usr/local/opt/php71-imagick/imagick.so, 9): image not found in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/opt/php71-intl/intl.so' - dlopen(/usr/local/opt/php71-intl/intl.so, 9): image not found in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/opt/php71-mcrypt/mcrypt.so' - dlopen(/usr/local/opt/php71-mcrypt/mcrypt.so, 9): image not found in Unknown on line 0
Failed loading /usr/local/opt/php71-opcache/opcache.so:  dlopen(/usr/local/opt/php71-opcache/opcache.so, 9): image not found
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/opt/php71-apcu/apcu.so' - dlopen(/usr/local/opt/php71-apcu/apcu.so, 9): image not found in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/opt/php71-geoip/geoip.so' - dlopen(/usr/local/opt/php71-geoip/geoip.so, 9): image not found in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/opt/php71-imagick/imagick.so' - dlopen(/usr/local/opt/php71-imagick/imagick.so, 9): image not found in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/opt/php71-intl/intl.so' - dlopen(/usr/local/opt/php71-intl/intl.so, 9): image not found in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/opt/php71-mcrypt/mcrypt.so' - dlopen(/usr/local/opt/php71-mcrypt/mcrypt.so, 9): image not found in Unknown on line 0
PHP Parse error:  syntax error, unexpected '' - dlopen(/usr/local/opt/php7' (T_CONSTANT_ENCAPSED_STRING), expecting ',' or ')' in Command line code on line 4
Failed loading /usr/local/opt/php71-opcache/opcache.so:  dlopen(/usr/local/opt/php71-opcache/opcache.so, 9): image not found
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/opt/php71-apcu/apcu.so' - dlopen(/usr/local/opt/php71-apcu/apcu.so, 9): image not found in Unknown on line 0

Warning: PHP Startup: Unable to load dynamic library '/usr/local/opt/php71-apcu/apcu.so' - dlopen(/usr/local/opt/php71-apcu/apcu.so, 9): image not found in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/opt/php71-geoip/geoip.so' - dlopen(/usr/local/opt/php71-geoip/geoip.so, 9): image not found in Unknown on line 0

Warning: PHP Startup: Unable to load dynamic library '/usr/local/opt/php71-geoip/geoip.so' - dlopen(/usr/local/opt/php71-geoip/geoip.so, 9): image not found in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/opt/php71-imagick/imagick.so' - dlopen(/usr/local/opt/php71-imagick/imagick.so, 9): image not found in Unknown on line 0

Warning: PHP Startup: Unable to load dynamic library '/usr/local/opt/php71-imagick/imagick.so' - dlopen(/usr/local/opt/php71-imagick/imagick.so, 9): image not found in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/opt/php71-intl/intl.so' - dlopen(/usr/local/opt/php71-intl/intl.so, 9): image not found in Unknown on line 0

Warning: PHP Startup: Unable to load dynamic library '/usr/local/opt/php71-intl/intl.so' - dlopen(/usr/local/opt/php71-intl/intl.so, 9): image not found in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/opt/php71-mcrypt/mcrypt.so' - dlopen(/usr/local/opt/php71-mcrypt/mcrypt.so, 9): image not found in Unknown on line 0

Warning: PHP Startup: Unable to load dynamic library '/usr/local/opt/php71-mcrypt/mcrypt.so' - dlopen(/usr/local/opt/php71-mcrypt/mcrypt.so, 9): image not found in Unknown on line 0
Could not open input file:
Warning: PHP Startup: Unable to load dynamic library '/usr/local/opt/php71-apcu/apcu.so' - dlopen(/usr/local/opt/php71-apcu/apcu.so, 9): image not found in Unknown on line 0

Warning: PHP Startup: Unable to load dynamic library '/usr/local/opt/php71-geoip/geoip.so' - dlopen(/usr/local/opt/php71-geoip/geoip.so, 9): image not found in Unknown on line 0

Warning: PHP Startup: Unable to load dynamic library '/usr/local/opt/php71-imagick/imagick.so' - dlopen(/usr/local/opt/php71-imagick/imagick.so, 9): image not found in Unknown on line 0

Warning: PHP Startup: Unable to load dynamic library '/usr/local/opt/php71-intl/intl.so' - dlopen(/usr/local/opt/php71-intl/intl.so, 9): image not found in Unknown on line 0

Warning: PHP Startup: Unable to load dynamic library '/usr/local/opt/php71-mcrypt/mcrypt.so' - dlopen(/usr/local/opt/php71-mcrypt/mcrypt.so, 9): image not found in Unknown on line 0

Parse error: syntax error, unexpected '' - dlopen(/usr/local/opt/php7' (T_CONSTANT_ENCAPSED_STRING), expecting ',' or ')' in Command line code on line 4/cli/valet.php
------------------------------------------------------------

I also did a brew upgrade after this, but now nothing seem to work anymore. Retrying valet fix or valet install will jost throw a lot of PHP errors about missing libraries. I'm guessing my symlinks to my libraries are broken, so I'll try to fix it manually, but I hope I can let Valet+ manage it instead for me.

Any help would be greatly appreciated. I had a working setup and I especially waited for the proposed fix, but it kind of blew up in my face ;-)

So I was able to fix the library issues by moving /usr/local/etc/php/7.1/conf.d to /usr/local/etc/php/7.1/_conf.d, and create a new, empty folder /usr/local/etc/php/7.1/conf.d and let Valet+ populate it. This works. The only thing that is not changed now is that Nginx does not switch PHP version when I switch using the CLI. Any thoughts on that?

The nginx fix was easy: I just had to remove ~/.valet/valet.sock and run valet restart. Valet would make a new socket and the binding with nginx would work perfectly when switching php versions.

Good work guys! Perhaps this use-case of mine could fix some issues or help other people who encounter these issues. To sum it up: When your valet fix and valet install is borked, do:

  • Empty out the /usr/local/etc/php/[version]/conf.d directory.
  • Delete ~/.valet/valet.sock
  • Run valet install (or valet restart).

@kanduvisla great you got it to work. Yes, all the old ext-*.ini files need to be moved (except for the opcache one) deleting the folder as you mentioned will regenerate the folder on install.

@Neodork : shouldn't this be something that also should be done by the fix-command? My assumption was that valet fix would automagically set everything right for me. I can imagine that this might be challenging for the less tech-savvy people among us.

@kanduvisla Currently the fix command tries to remove every supported extension (ext-*.ini) file. Then it tries to link the correct PHP. I didn't remove the directories because there might be users with custom configuration within their PHP installation. I found it dangerous.

However I do agree that people that are less into the subject should have an easier way to setup the correct configuration. How does adding --force option to force a new installation upon running valet fix sound to you?

Fair point, a --force and/or a clear notification / instructions for this might be a good solution.

How to install php70-tidy now?

pecl install -f tidy

Error:

running: phpize
Cannot find config.m4.
Make sure that you run '/usr/local/opt/[email protected]/bin/phpize' in the top level source directory of the module

ERROR: `phpize' failed

@Egorby I think tidy is packaged within php 5+. You could try installing the brew version: brew install tidy-html5.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

luukschakenraad picture luukschakenraad  路  18Comments

kupoback picture kupoback  路  22Comments

regularlabs picture regularlabs  路  19Comments

ezequielalba picture ezequielalba  路  15Comments

sirjonathan picture sirjonathan  路  14Comments