Upgrading to Composer 2.0

Here is  a quick guide on how to upgrade your servers to Composer 2 and make the most of the benefits this release brings. Composer 2 was released on 24th October 2020.

By default, when setting up a new server, you will automatically receive Composer 2. However, should you have an existing server, you need to delete and recreate (if desired) the scheduled job which updates your Composer installation every week, using your Forge dashboard. By default, Forge would have created this job with the "--1" flag, hereby instructing Composer to not upgrade to 2.0. After you have deleted the scheduled task, you may recreate it without the --1 flag if desired.

After doing the above, you can manually upgrade your server to Composer, by connecting to the server and manually running the upgrade command. If you have multiple servers, it would be more efficient to create a recipe.

The command to instruct Composer to update itself and select version 2 is:

composer self-update --2

Afterwards, should you need to roll back to Composer 1 due to application incompatibility for example, you can execute the following command:

composer self-update --1