Advertisement
Guest User

Untitled

a guest
Nov 30th, 2015
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. # Upgrade php in brew & keep phpcs
  2.  
  3. - still valid for v5.6.16
  4.  
  5. Every time you upgrade php, you loose `phpcs` command. So, you need install it again.
  6. **Prerequirement:** You need to install php with pear enabled: `brew install php56 --with-pear`
  7.  
  8. ## Steps
  9.  
  10. ````bash
  11. $ brew upgrade php56
  12.  
  13. # to ensure all lib can be writable by pear
  14. $ chmod -R ug+w /usr/local/Cellar/php56/<VERSION>/lib/php/
  15.  
  16. $ pear config-set php_ini /usr/local/etc/php/5.6/php.ini system
  17.  
  18. # write dovn all of your custon installed package
  19. $ pear list
  20. # Standard packages are:
  21. # Archive_Tar
  22. # Console_Getopt
  23. # PEAR
  24. # Structures_Graph
  25. # XML_Util
  26.  
  27. $ pear upgrade-all
  28.  
  29. $ pear install PHP_CodeSniffer
  30.  
  31. # now you can clean up old formulae
  32. $ brew cleanup
  33. ````
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement