-
-
Save bobthecow/85ad6dfb594d9215b42b to your computer and use it in GitHub Desktop.
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 |
Error: Unable to guess PHP branch for Formulary::Formulae::Php56Apcu
when I try to install any extensions (just switch Php56Apcu to other package name). 😢
太棒了!萬分感謝!
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:in
class:Php56'
/usr/local/Library/Taps/homebrew/homebrew-php/Formula/php56.rb:3:in load_file' /usr/local/Library/Homebrew/formulary.rb:92:in
module_eval'
/usr/local/Library/Homebrew/formulary.rb:92:in load_file' /usr/local/Library/Homebrew/formulary.rb:82:in
klass'
/usr/local/Library/Homebrew/formulary.rb:71:in get_formula' /usr/local/Library/Homebrew/formulary.rb:200:in
factory'
/usr/local/Library/Homebrew/extend/ARGV.rb:16:in block in formulae' /usr/local/Library/Homebrew/extend/ARGV.rb:16:in
map'
/usr/local/Library/Homebrew/extend/ARGV.rb:16:in formulae' /usr/local/Library/Homebrew/cmd/install.rb:41:in
install'
/usr/local/Library/brew.rb:135:in `
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
This will probably need PEAR to be installed: brew install php56 --with-pear
. To remove outdated packages, use brew cleanup
.
Thank you !!!!
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.
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.
Super! As I'm new to Mac and Homebrew, that helped me a lot, thank you!