Yes. I just upgrade my Composer installation on my Windows 10 desktop PC. Not too hard. But also good to keep it updated.

My PC is Windows 10 Pro, version 20H2, OS build 19042.746.

I use git for windows as my command shell. So it is promoted as  MINGW64.

First, I check the existing version on my Windows 10. composer -v

david@DESKTOP-David MINGW64 ~
$ composer -v
______
/ ____/___ ____ ___ ____ ____ ________ _____
/ / / __ \/ __ `__ \/ __ \/ __ \/ ___/ _ \/ ___/
/ /___/ /_/ / / / / / / /_/ / /_/ (__ ) __/ /
\____/\____/_/ /_/ /_/ .___/\____/____/\___/_/
/_/
Composer version 1.10.13 2020-09-09 11:46:34

It is 1.10.13.

Secondly, I did an update to the latest Composer 1.x.

composer self-update

david@DESKTOP-David MINGW64 ~
$ composer self-update
A new stable major version of Composer is available (2.0.9), run "composer self-update --2" to update to it. See also https://github.com/composer/composer/releases for changelogs.
Updating to version 1.10.20 (1 channel).
Downloading (100%)
Unable to write "C:\ProgramData\ComposerSetup\bin\composer.phar". Access is denied.
Complete this operation with Administrator privileges [Y,n]? y
Operation succeeded.
Use composer self-update --rollback to return to version 1.10.13

david@DESKTOP-David MINGW64 ~
$ composer -v
______
/ ____/___ ____ ___ ____ ____ ________ _____
/ / / __ \/ __ `__ \/ __ \/ __ \/ ___/ _ \/ ___/
/ /___/ /_/ / / / / / / /_/ / /_/ (__ ) __/ /
\____/\____/_/ /_/ /_/ .___/\____/____/\___/_/
/_/
Composer version 1.10.20 2021-01-27 15:41:06

So, it is Composer version 1.10.20.

Last, I upgrade Composer from 1.x to 2.x by command: composer self-update --2

david@DESKTOP-David MINGW64 ~
$ composer self-update --2
Updating to version 2.0.9 (2.x channel).
Downloading (100%)
Unable to write "C:\ProgramData\ComposerSetup\bin\composer.phar". Access is denied.
Complete this operation with Administrator privileges [Y,n]? y
Operation succeeded.
Use composer self-update --rollback to return to version 1.10.20

david@DESKTOP-David MINGW64 ~
$ composer -v
______
/ ____/___ ____ ___ ____ ____ ________ _____
/ / / __ \/ __ `__ \/ __ \/ __ \/ ___/ _ \/ ___/
/ /___/ /_/ / / / / / / /_/ / /_/ (__ ) __/ /
\____/\____/_/ /_/ /_/ .___/\____/____/\___/_/
/_/
Composer version 2.0.9 2021-01-27 16:09:27

Then, my Composer installation is version 2.0.9.

David Yin

David is a blogger, geek, and web developer — founder of FreeInOutBoard.com. If you like his post, you can say thank you here

Leave a Reply

Your email address will not be published. Required fields are marked *