PHP load and tap errors with latest brew


(Aª) #1

I upgraded to the latest brew and now on time zsh loads it gives me the error:

Error: No available formula with the name "homebrew/php/php71"
Please tap it and then try again: brew tap homebrew/php

Doing a tap as instructed gives more errors:

[~] git config --global --unset core.symlinks
[~] brew tap homebrew/php
==> Tapping homebrew/php
Cloning into '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-php'...
remote: Counting objects: 154, done.
remote: Compressing objects: 100% (147/147), done.
remote: Total 154 (delta 11), reused 18 (delta 1), pack-reused 0
Receiving objects: 100% (154/154), 94.18 KiB | 323.00 KiB/s, done.
Resolving deltas: 100% (11/11), done.
Error: Non-file alias: /usr/local/Homebrew/Library/Taps/homebrew/homebrew-php/Aliases/phpunit@7.0
Error: Non-file alias: /usr/local/Homebrew/Library/Taps/homebrew/homebrew-php/Aliases/php-code-    sniffer@3
Error: Invalid formula: /usr/local/Homebrew/Library/Taps/homebrew/homebrew-php/Formula/xdebug-osx.rb
No available formula with the name "php53"
Error: Invalid formula: /usr/local/Homebrew/Library/Taps/homebrew/homebrew-php/Formula/drush.rb
No available formula with the name "php55"
Error: Cannot tap homebrew/php: invalid syntax in tap!

Any help is much appreciated.


(Dimitar Yanakiev) #2

I have exactly the same problem…
I reinstalled my Mac today and now I can’t setup my environment to work…

➜  ~ brew tap homebrew/php
==> Tapping homebrew/php
Cloning into '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-php'...
remote: Counting objects: 154, done.
remote: Compressing objects: 100% (147/147), done.
remote: Total 154 (delta 11), reused 19 (delta 1), pack-reused 0
Receiving objects: 100% (154/154), 94.18 KiB | 551.00 KiB/s, done.
Resolving deltas: 100% (11/11), done.
Error: Non-file alias: /usr/local/Homebrew/Library/Taps/homebrew/homebrew-php/Aliases/phpunit@7.0
Error: Non-file alias: /usr/local/Homebrew/Library/Taps/homebrew/homebrew-php/Aliases/php-code-sniffer@3
Error: Invalid formula: /usr/local/Homebrew/Library/Taps/homebrew/homebrew-php/Formula/xdebug-osx.rb
No available formula with the name "php53"
Error: Invalid formula: /usr/local/Homebrew/Library/Taps/homebrew/homebrew-php/Formula/drush.rb
No available formula with the name "php55"
Error: Cannot tap homebrew/php: invalid syntax in tap!

(Dimitar Yanakiev) #3

Just a little update, I needed homebrew-php to install extensions but I found that pecl install xx work too.

Example:
pecl install redis

You need to have autoconf installed in order pecl to work
brew install autoconf


(Mike McQuaid) #4

This is intentional; homebrew-php has been deprecated: https://github.com/homebrew/homebrew-php#homebrewphp-deprecated


(Aª) #5

Thanks for the responses. I understand the deprecation but how do I remove the tap error message whenever zsh loads? I don’t even need PHP anymore.


(Mike McQuaid) #6

I can’t tell you without figuring out what brew command gives you that error, I’m afraid.


(Aª) #7

I can’t tell you without figuring out what brew command gives you that error, I’m afraid.

That was it! A command that gave the error. I was using the following command to setup my path which kept spitting that error.

brew --prefix homebrew/php/php71

Thanks @MikeMcQuaid!


(Edward Weymouth) #8

Ah the simple things, missed that one too…