If you don't have Homebrew, install it:
$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"If you don't have wget, install it:
$ brew install wgetDownload and install composer
$ wget https://raw.githubusercontent.com/composer/getcomposer.org/master/web/installer -O - -q | php --Move it to access it globally
$ sudo mv composer.phar /usr/local/bin/composerEcho to your .bash_profile to be able to call composer globally if you haven't done so before (cat ~/.bash_profile to verify)
$ echo 'export PATH=/usr/local/bin:$PATH' >> ~/.bash_profileRefresh your Terminal window
source ~/.bash_profileTest your installation with:
$ composer -V
# Expect: Composer version 1.7.2 2018-08-16 16:57:12- If you are using Oh My Zsh, replace
~/.bash_profilewith~/.bzshrcfor all above commands.