how to upgrade composer using php code example Example 1: upgrade composer version composer self-update Example 2: php composer update php composer.phar update