Instantly share code, notes, and snippets.

@bobthecow /install.sh Secret
Last active May 7, 2018

Embed
What would you like to do?
brew tap homebrew/dupes
brew tap homebrew/versions
brew tap homebrew/homebrew-php
brew install php56
# Fix PEAR permissions
chmod -R ug+w `brew --prefix php56`/lib/php
pear config-set php_ini /usr/local/etc/php/5.6/php.ini
# Fix PEAR config and upgrade
pear config-set auto_discover 1
pear update-channels
pear upgrade
# Install PHP extensions
# You might want some more. Use `brew search php56` to see what's available.
brew install php56-mongo php56-memcache
# You'll want Composer
brew install composer
# Install some important Composer packages globally
composer global require phpunit/phpunit:~4.2
composer global require squizlabs/php_codesniffer:~1.5
composer global require fabpot/php-cs-fixer:~0.5
composer global require psy/psysh:~0.1
# Make sure to add Composer's `bin` directory to your $PATH
# … or none of these will work.
# Set "PSR-2" as your default coding standard
phpcs --config-set default_standard PSR2
@jeffstumpf1

This comment has been minimized.

Show comment
Hide comment
@jeffstumpf1

jeffstumpf1 Feb 8, 2014

This script saved me in installing symfony!

jeffstumpf1 commented Feb 8, 2014

This script saved me in installing symfony!

@brettalton

This comment has been minimized.

Show comment
Hide comment
@brettalton

brettalton Sep 10, 2014

Why do you install php56 and then install php54-* extensions?

brettalton commented Sep 10, 2014

Why do you install php56 and then install php54-* extensions?

@bobthecow

This comment has been minimized.

Show comment
Hide comment
@bobthecow

bobthecow Nov 3, 2014

@brettalton copypasta. It's fixed now :)

Owner

bobthecow commented Nov 3, 2014

@brettalton copypasta. It's fixed now :)

@grantgeorge

This comment has been minimized.

Show comment
Hide comment
@grantgeorge

grantgeorge Feb 10, 2015

you're the man! Thank you

grantgeorge commented Feb 10, 2015

you're the man! Thank you

@marcandreappel

This comment has been minimized.

Show comment
Hide comment
@marcandreappel

marcandreappel Mar 2, 2015

Super! As I'm new to Mac and Homebrew, that helped me a lot, thank you!

marcandreappel commented Mar 2, 2015

Super! As I'm new to Mac and Homebrew, that helped me a lot, thank you!

@rockymontana

This comment has been minimized.

Show comment
Hide comment
@rockymontana

rockymontana Mar 26, 2015

Error: Unable to guess PHP branch for Formulary::Formulae::Php56Apcu

when I try to install any extensions (just switch Php56Apcu to other package name). 😢

rockymontana commented Mar 26, 2015

Error: Unable to guess PHP branch for Formulary::Formulae::Php56Apcu

when I try to install any extensions (just switch Php56Apcu to other package name). 😢

@zx1986

This comment has been minimized.

Show comment
Hide comment
@zx1986

zx1986 Apr 13, 2015

太棒了!萬分感謝!

zx1986 commented Apr 13, 2015

太棒了!萬分感謝!

@df365

This comment has been minimized.

Show comment
Hide comment
@df365

df365 Dec 25, 2015

Got the following after 'brew install php56':

Error: undefined method desc' for Formulary::Formulae::Php56:Class Please report this bug: https://git.io/brew-troubleshooting /usr/local/Library/Taps/homebrew/homebrew-php/Formula/php56.rb:5:inclass:Php56'
/usr/local/Library/Taps/homebrew/homebrew-php/Formula/php56.rb:3:in load_file' /usr/local/Library/Homebrew/formulary.rb:92:inmodule_eval'
/usr/local/Library/Homebrew/formulary.rb:92:in load_file' /usr/local/Library/Homebrew/formulary.rb:82:inklass'
/usr/local/Library/Homebrew/formulary.rb:71:in get_formula' /usr/local/Library/Homebrew/formulary.rb:200:infactory'
/usr/local/Library/Homebrew/extend/ARGV.rb:16:in block in formulae' /usr/local/Library/Homebrew/extend/ARGV.rb:16:inmap'
/usr/local/Library/Homebrew/extend/ARGV.rb:16:in formulae' /usr/local/Library/Homebrew/cmd/install.rb:41:ininstall'
/usr/local/Library/brew.rb:135:in `

'

df365 commented Dec 25, 2015

Got the following after 'brew install php56':

Error: undefined method desc' for Formulary::Formulae::Php56:Class Please report this bug: https://git.io/brew-troubleshooting /usr/local/Library/Taps/homebrew/homebrew-php/Formula/php56.rb:5:inclass:Php56'
/usr/local/Library/Taps/homebrew/homebrew-php/Formula/php56.rb:3:in load_file' /usr/local/Library/Homebrew/formulary.rb:92:inmodule_eval'
/usr/local/Library/Homebrew/formulary.rb:92:in load_file' /usr/local/Library/Homebrew/formulary.rb:82:inklass'
/usr/local/Library/Homebrew/formulary.rb:71:in get_formula' /usr/local/Library/Homebrew/formulary.rb:200:infactory'
/usr/local/Library/Homebrew/extend/ARGV.rb:16:in block in formulae' /usr/local/Library/Homebrew/extend/ARGV.rb:16:inmap'
/usr/local/Library/Homebrew/extend/ARGV.rb:16:in formulae' /usr/local/Library/Homebrew/cmd/install.rb:41:ininstall'
/usr/local/Library/brew.rb:135:in `

'

@tomsihap

This comment has been minimized.

Show comment
Hide comment
@tomsihap

tomsihap Jan 20, 2016

This is awesome!
Some issues :

first issue
$ composer global require fabpot/php-cs-fixer:~0.5
Changed current directory to /Users/tomsihap/.composer
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

Problem 1
- fabpot/php-cs-fixer v0.5.0 requires sebastian/diff 1.1.* -> satisfiable by sebastian/diff[1.1.0].
- fabpot/php-cs-fixer v0.5.1 requires sebastian/diff 1.1.* -> satisfiable by sebastian/diff[1.1.0].
- fabpot/php-cs-fixer v0.5.2 requires sebastian/diff 1.1.* -> satisfiable by sebastian/diff[1.1.0].
- fabpot/php-cs-fixer v0.5.3 requires sebastian/diff 1.1.* -> satisfiable by sebastian/diff[1.1.0].
- fabpot/php-cs-fixer v0.5.4 requires sebastian/diff 1.1.* -> satisfiable by sebastian/diff[1.1.0].
- fabpot/php-cs-fixer v0.5.5 requires sebastian/diff 1.1.* -> satisfiable by sebastian/diff[1.1.0].
- fabpot/php-cs-fixer v0.5.6 requires sebastian/diff 1.1.* -> satisfiable by sebastian/diff[1.1.0].
- fabpot/php-cs-fixer v0.5.7 requires sebastian/diff 1.1.* -> satisfiable by sebastian/diff[1.1.0].
- Conclusion: don't install sebastian/diff 1.1.0
- Installation request for fabpot/php-cs-fixer ~0.5 -> satisfiable by fabpot/php-cs-fixer[v0.5.0, v0.5.1, v0.5.2, v0.5.3, v0.5.4, v0.5.5, v0.5.6, v0.5.7].

Installation failed, reverting ./composer.json to its original content.

Second issue
$ phpcs --config-set default_standard PSR2
zsh: command not found: phpcs

tomsihap commented Jan 20, 2016

This is awesome!
Some issues :

first issue
$ composer global require fabpot/php-cs-fixer:~0.5
Changed current directory to /Users/tomsihap/.composer
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

Problem 1
- fabpot/php-cs-fixer v0.5.0 requires sebastian/diff 1.1.* -> satisfiable by sebastian/diff[1.1.0].
- fabpot/php-cs-fixer v0.5.1 requires sebastian/diff 1.1.* -> satisfiable by sebastian/diff[1.1.0].
- fabpot/php-cs-fixer v0.5.2 requires sebastian/diff 1.1.* -> satisfiable by sebastian/diff[1.1.0].
- fabpot/php-cs-fixer v0.5.3 requires sebastian/diff 1.1.* -> satisfiable by sebastian/diff[1.1.0].
- fabpot/php-cs-fixer v0.5.4 requires sebastian/diff 1.1.* -> satisfiable by sebastian/diff[1.1.0].
- fabpot/php-cs-fixer v0.5.5 requires sebastian/diff 1.1.* -> satisfiable by sebastian/diff[1.1.0].
- fabpot/php-cs-fixer v0.5.6 requires sebastian/diff 1.1.* -> satisfiable by sebastian/diff[1.1.0].
- fabpot/php-cs-fixer v0.5.7 requires sebastian/diff 1.1.* -> satisfiable by sebastian/diff[1.1.0].
- Conclusion: don't install sebastian/diff 1.1.0
- Installation request for fabpot/php-cs-fixer ~0.5 -> satisfiable by fabpot/php-cs-fixer[v0.5.0, v0.5.1, v0.5.2, v0.5.3, v0.5.4, v0.5.5, v0.5.6, v0.5.7].

Installation failed, reverting ./composer.json to its original content.

Second issue
$ phpcs --config-set default_standard PSR2
zsh: command not found: phpcs

@franz-josef-kaiser

This comment has been minimized.

Show comment
Hide comment
@franz-josef-kaiser

franz-josef-kaiser Jan 20, 2016

This will probably need PEAR to be installed: brew install php56 --with-pear. To remove outdated packages, use brew cleanup.

franz-josef-kaiser commented Jan 20, 2016

This will probably need PEAR to be installed: brew install php56 --with-pear. To remove outdated packages, use brew cleanup.

@universe416

This comment has been minimized.

Show comment
Hide comment
@universe416

universe416 Sep 26, 2016

Thank you !!!!

universe416 commented Sep 26, 2016

Thank you !!!!

@vikramsurya

This comment has been minimized.

Show comment
Hide comment
@vikramsurya

vikramsurya Feb 19, 2017

Error below -- any help?

composer global require fabpot/php-cs-fixer:~0.5
returns:
Changed current directory to /Users/vikram/.composer
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

Problem 1
- fabpot/php-cs-fixer v0.5.0 requires sebastian/diff 1.1.* -> satisfiable by sebastian/diff[1.1.0].
- fabpot/php-cs-fixer v0.5.1 requires sebastian/diff 1.1.* -> satisfiable by sebastian/diff[1.1.0].
- fabpot/php-cs-fixer v0.5.2 requires sebastian/diff 1.1.* -> satisfiable by sebastian/diff[1.1.0].
- fabpot/php-cs-fixer v0.5.3 requires sebastian/diff 1.1.* -> satisfiable by sebastian/diff[1.1.0].
- fabpot/php-cs-fixer v0.5.4 requires sebastian/diff 1.1.* -> satisfiable by sebastian/diff[1.1.0].
- fabpot/php-cs-fixer v0.5.5 requires sebastian/diff 1.1.* -> satisfiable by sebastian/diff[1.1.0].
- fabpot/php-cs-fixer v0.5.6 requires sebastian/diff 1.1.* -> satisfiable by sebastian/diff[1.1.0].
- fabpot/php-cs-fixer v0.5.7 requires sebastian/diff 1.1.* -> satisfiable by sebastian/diff[1.1.0].
- Conclusion: don't install sebastian/diff 1.1.0
- Installation request for fabpot/php-cs-fixer ~0.5 -> satisfiable by fabpot/php-cs-fixer[v0.5.0, v0.5.1, v0.5.2, v0.5.3, v0.5.4, v0.5.5, v0.5.6, v0.5.7].

Installation failed, reverting ./composer.json to its original content.


vikramsurya commented Feb 19, 2017

Error below -- any help?

composer global require fabpot/php-cs-fixer:~0.5
returns:
Changed current directory to /Users/vikram/.composer
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

Problem 1
- fabpot/php-cs-fixer v0.5.0 requires sebastian/diff 1.1.* -> satisfiable by sebastian/diff[1.1.0].
- fabpot/php-cs-fixer v0.5.1 requires sebastian/diff 1.1.* -> satisfiable by sebastian/diff[1.1.0].
- fabpot/php-cs-fixer v0.5.2 requires sebastian/diff 1.1.* -> satisfiable by sebastian/diff[1.1.0].
- fabpot/php-cs-fixer v0.5.3 requires sebastian/diff 1.1.* -> satisfiable by sebastian/diff[1.1.0].
- fabpot/php-cs-fixer v0.5.4 requires sebastian/diff 1.1.* -> satisfiable by sebastian/diff[1.1.0].
- fabpot/php-cs-fixer v0.5.5 requires sebastian/diff 1.1.* -> satisfiable by sebastian/diff[1.1.0].
- fabpot/php-cs-fixer v0.5.6 requires sebastian/diff 1.1.* -> satisfiable by sebastian/diff[1.1.0].
- fabpot/php-cs-fixer v0.5.7 requires sebastian/diff 1.1.* -> satisfiable by sebastian/diff[1.1.0].
- Conclusion: don't install sebastian/diff 1.1.0
- Installation request for fabpot/php-cs-fixer ~0.5 -> satisfiable by fabpot/php-cs-fixer[v0.5.0, v0.5.1, v0.5.2, v0.5.3, v0.5.4, v0.5.5, v0.5.6, v0.5.7].

Installation failed, reverting ./composer.json to its original content.


@vukanac

This comment has been minimized.

Show comment
Hide comment
@vukanac

vukanac Aug 20, 2017

brew tap homebrew/dupes
brew tap homebrew/versions

Warning: homebrew/dupes was deprecated. This tap is now empty as all its formulae were migrated.
Warning: homebrew/versions was deprecated. This tap is now empty as all its formulae were migrated.

vukanac commented Aug 20, 2017

brew tap homebrew/dupes
brew tap homebrew/versions

Warning: homebrew/dupes was deprecated. This tap is now empty as all its formulae were migrated.
Warning: homebrew/versions was deprecated. This tap is now empty as all its formulae were migrated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment