How to install Composer v1.1.1 in Ubuntu? I have tried below one but its always installed latest version of Composer:
curl -sS https://getcomposer.org/installer | sudo php
sudo mv composer.phar /usr/local/bin/composer
export PATH="$HOME/.composer/vendor/bin:$PATH"
To change to version one run the self-update command and pass in the --1 flag. This will change composer to version one and now you can install your dependencies. Once you have installed your dependencies, now you can run the same command and pass in --2 as the flag and this will switch back to composer version 2.
Installation PHP composer on Windows:Step 1: Navigate to the official composer website. Step 2: Then click on the Download button. Step 3: Then click on the Composer-Setup.exe & download the file. Step 4: Then click on “Install for all users”.
If you just want to go back to 1. x line, use composer self-update --1 (or composer self-update 1.10. 17 if your composer does not support --1 flag).
If you are using a docker container the following method would be better:
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer --version=1.10.16
Ensure you have curl installed before using this method. This was tested on ubuntu 20.04 Docker container.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With