composer

Using Composer v1

The ZoneOS platform uses composer version 2.x by default. However, some older plugins may require the first version of composer.

Composer v1 can be installed on a virtual server using the following command:

mkdir -p ~/bin && cd ~/bin && wget https://getcomposer.org/composer-1.phar && mv composer-1.phar composer && chmod +x composer && hash -r

Now composer -V shows: Composer version 1.x

If you want to use the default composer on the server again, you need to remove composer from the ~/bin directory:

rm -f ~/bin/composer

Changing the version of the self-installed Composer

If composer is already installed on the virtual server, you can easily change its version with the following command. The command to change to version 2.x:

composer self-update --2

Command to return to version 1:

composer self-update --1
Updated on 3. Apr 2024

Was this article helpful?

Related Articles