Shell/Bash: upgrade composer version Example

By

Shell/Bash Example: This is the "upgrade composer version" Example. compiled from many sources on the internet by SimpleTutorials.org

upgrade composer version

composer self-update

update composer php version

php7.3 -f /usr/local/bin/composer update

composer upgrade to 2

run which composer (output /usr/bin/composer)
run php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
run sudo php composer-setup.php --install-dir=/usr/bin --filename=composer

composer update

php composer.phar update

update composer

 To update composer command just find location of composer.phar and update as:
 where composer 	#Retrieves you location of your composer.phar
 cd path_to_composer.phar #Move to directory with composer.phar
 php composer.phar self-update	#Update your composer


* Summary: This "upgrade composer version" Shell/Bash Example is compiled from the internet. If you have any questions, please leave a comment. Thank you!

Others