composer global code example
Example 1: upgrade composer version
composer self-update
Example 2: update packages composer global
composer global update
Example 3: upgrading composer globally on windows
php composer.phar self-update
Example 4: run global packages macos composer
export PATH=~/.composer/vendor/bin:$PATH
Example 5: composer mac
php composer-setup.php --install-dir=bin --filename=composer