Skip to content

Instantly share code, notes, and snippets.

@agarzon
Last active October 27, 2021 03:48
Show Gist options
  • Star 12 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save agarzon/ecb0b92d4c8e1bbde126534c76721a58 to your computer and use it in GitHub Desktop.
Save agarzon/ecb0b92d4c8e1bbde126534c76721a58 to your computer and use it in GitHub Desktop.
Install globally popular PHP dev tools like composer, phpunit, phpcs, phpmd, phpcpd, deployer, robo, codeception, etc.
#!/bin/bash
#To execute it directly: sudo bash <(curl -s https://gist.githubusercontent.com/agarzon/ecb0b92d4c8e1bbde126534c76721a58/raw/install-php-tools.sh)
BIN_PATH=/usr/local/bin/
#COMPOSER
sudo curl -LsS https://getcomposer.org/composer.phar -o ${BIN_PATH}composer
sudo chmod a+x ${BIN_PATH}composer
#CODECEPTION
sudo curl -LsS http://codeception.com/codecept.phar -o ${BIN_PATH}codecept
sudo chmod a+x ${BIN_PATH}codecept
#PHPMD
sudo curl -LsS https://phpmd.org/static/latest/phpmd.phar -o ${BIN_PATH}phpmd
sudo chmod a+x ${BIN_PATH}phpmd
#DEPLOYER
sudo curl -LsS http://deployer.org/deployer.phar -o ${BIN_PATH}dep
sudo chmod a+x ${BIN_PATH}dep
#ROBO
sudo curl -LsS http://robo.li/robo.phar -o ${BIN_PATH}robo
sudo chmod a+x ${BIN_PATH}robo
#PHPCPD
sudo curl -LsS https://phar.phpunit.de/phpcpd.phar -o ${BIN_PATH}phpcpd
sudo chmod a+x ${BIN_PATH}phpcpd
#PHPCS
sudo curl -LsS https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar -o ${BIN_PATH}phpcs
sudo chmod a+x ${BIN_PATH}phpcs
#PHPCBF
sudo curl -LsS https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar -o ${BIN_PATH}phpcbf
sudo chmod a+x ${BIN_PATH}phpcbf
#PHPUNIT
sudo curl -LsS https://phar.phpunit.de/phpunit.phar -o ${BIN_PATH}phpunit
sudo chmod a+x ${BIN_PATH}phpunit
#PSYSH
sudo curl -LsS https://git.io/psysh -o ${BIN_PATH}psysh
sudo chmod a+x ${BIN_PATH}psysh
#PHP-CS-FIXER
sudo curl -LsS http://cs.sensiolabs.org/download/php-cs-fixer-v2.phar -o ${BIN_PATH}php-cs-fixer
sudo chmod a+x ${BIN_PATH}php-cs-fixer
@agarzon
Copy link
Author

agarzon commented Nov 26, 2016

sudo bash <(curl -s https://gist.githubusercontent.com/agarzon/ecb0b92d4c8e1bbde126534c76721a58/raw/install-php-tools.sh)

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