- updated for 5.5.30
If You upgrade your existing php package via brew upgrade
you need to manually update your pear.conf
file.
$ brew upgrade php55
# or
$ brew rm php55 && install php55 --with-pear
# to ensure all lib can be writable by pear
$ chmod -R ug+w /usr/local/Cellar/php55/<VERSION>/lib/php/
$ pear config-set php_ini /usr/local/etc/php/5.5/php.ini system
# write dovn all of your custon installed package
# Standard packages are:
# Archive_Tar
# Console_Getopt
# PEAR
# Structures_Graph
# XML_Util
$ pear list
# replace all previous version to the newly installed one
# (eg. 5.5.23 -> 5.5.24) in paths
$ nano /usr/local/etc/php/5.5/pear.conf
$ pear upgrade-all
$ pear install <your custon installed package>
# example:
$ pear install PHP_CodeSniffer
# now you can cleanup old formulae
$ brew cleanup