composer global install package code example
Example 1: upgrade composer version
composer self-update
Example 2: run global packages macos composer
export PATH=~/.composer/vendor/bin:$PATH
composer self-update
export PATH=~/.composer/vendor/bin:$PATH