How can we help you today?

How to use Composer 2 on your Hypernode

Created by: Rens Zuurbier

Modified on: Tue, 14 Sep, 2021 at 11:38 AM


On Hypernode we want to offer the best experience for e-commerce developers out of the box. We strive to have good defaults so that as a Magento or Shopware developer you can get quickly up and running. For that reason we prevented our default /usr/local/composer installation from self-updating to the 2.0 version by self updating with the --1  flag. The reason for this is backwards compatibility because Magento only started including support for composer 2 in Magento 2.4.2.


In this release we added a new separate installation of composer for convenience. Of course you could install any version of composer you want manually by running:



wget https://getcomposer.org/composer-stable.phar -O composer
chmod +x composer
Composer version 2.0.12 2021-04-01 10:14:59


But to have all the relevant development tools available out of the box we have now also added composer2 in a separate path:


$ which composer
/usr/local/bin/composer
$ which composer2
/usr/local/bin/composer2
$ composer --version
Composer version 1.10.21 2021-04-01 09:16:34
$ composer2 --version
Composer version 2.0.12 2021-04-01 10:14:59


So if you want to use Composer 2 you only need to run composer2 instead of composer.

R
Rens is the author of this solution article.

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.