command to update composer code example
Example 1: upgrade composer version
composer self-update
Example 2: update packages composer global
composer global update
Example 3: php composer update
php composer.phar update
composer self-update
composer global update
php composer.phar update