upgrade composer globally code example
Example 1: upgrade composer version
composer self-update
Example 2: upgrading composer globally on windows
php composer.phar self-update
composer self-update
php composer.phar self-update