- still valid for v5.6.21
Every time you upgrade php, you loose phpcs
command. So, you need install it again.
Prerequirement: You need to install php with pear enabled: brew install php56 --with-pear
$ brew upgrade php56
# to ensure all lib can be writable by pear
$ chmod -R ug+w /usr/local/Cellar/php56/<VERSION>/lib/php/
$ pear config-set php_ini /usr/local/etc/php/5.6/php.ini system
# write dovn all of your custon installed package
$ pear list
# Standard packages are:
# Archive_Tar
# Console_Getopt
# PEAR
# Structures_Graph
# XML_Util
$ pear upgrade-all
$ pear install PHP_CodeSniffer
# now you can clean up old formulae
$ brew cleanup