Question
How can I downgrade composer 2?
Answer
First you will need to download the older RPM from httpupdate server. You can install this package on your server using the command:
wget http://httpupdate.cpanel.net/RPM/11.86/centos/7/x86_64/cpanel-php-composer-1.8.6-1.cp1186.noarch.rpm
Next, remove composer 2:
rpm -e cpanel-php-composer-2.0.6-1.cp1186.noarch
Install the new older 1.8.6 RPM with the following.
rpm -ivh cpanel-php-composer-1.8.6-1.cp1186.noarch.rpm
Verify the package installed correctly
rpm -ql cpanel-php-composer-1.8.6-1.cp1186.noarch
Next, set the target to uninstalled
/usr/local/cpanel/scripts/update_local_rpm_versions --edit target_settings.composer unmanaged
And finally, verify the installed composer version.
/opt/cpanel/composer/bin/composer -V
Completing the above steps will downgrade Composer and prevent cPanel from updating the Composer version.
Note that only the following versions of Composer are available in the repository.
- 1.8.6
- 2.0.6