Downgrade composer from 2.x to 1.x via brew

You just upgraded your brew packages and composer updated itself to version 2.x but you still need version 1.x? This is how you can downgrade (& upgrade again):

Show available versions of composer:

brew log composer

For me the latest 1.x version to date is: composer 1.10.15

Let’s downgrade

composer self-update 1.10.15

To switch back to the 2.x version use

composer self-update --rollback

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store