how to check composer version code example

Example 1: check composer php version

composer -vvv about

Example 2: upgrade composer version

composer self-update

Example 3: install composer mac

curl -sS https://getcomposer.org/installer | php
php composer.phar install
mv composer.phar /usr/local/bin/composer
open -e  ~/.zshrc
// or open -e  ~/.bash_profile
alias composer="php /usr/local/bin/composer"

Example 4: composer check package version

composer show package/name

Example 5: upgrading composer globally on windows

php composer.phar self-update

Example 6: composer mac

php composer-setup.php --install-dir=bin --filename=composer