A while back we added composer 2 in a separate path so that users could keep using composer 1 for backwards compatibility.

app@levka6-appname-magweb-cmbl:~$ which composer
/usr/local/bin/composer
app@levka6-appname-magweb-cmbl:~$ which composer2
/usr/local/bin/composer2

 

Recently we’ve had some users experience issues because software like Shopware 6 which requires composer 2 couldn’t find this alternative composer path. Some of their scripts depend on composer 2 being the system default composer. As of now we’ll provide composer 2 as the default composer version on new Hypernodes and we’ve made setting the system composer version to 1 or 2 configurable. All existing nodes will keep composer 1 as their /usr/local/bin/composer unless otherwise configured.

To switch between composer versions you can use the hypernode-api or the hypernode-systemctl command-line tool:

app@levka6-appname-magweb-cmbl:~$ ls -lah /usr/local/bin/composer
lrwxrwxrwx 1 root root 9 Jan  5 16:08 /usr/local/bin/composer -> composer1
app@levka6-appname-magweb-cmbl:~$ ls -lah /usr/local/bin/composer*
lrwxrwxrwx 1 root root    9 Jan  5 16:08 /usr/local/bin/composer -> composer1
-rwxr-xr-x 1 root root 2.0M Jan  5 16:09 /usr/local/bin/composer1
-rwxr-xr-x 1 root root 2.3M Jan  5 16:09 /usr/local/bin/composer2
app@levka6-appname-magweb-cmbl:~$ hypernode-systemctl settings composer_version 2.x
Operation was successful and is being processed. Please allow a few minutes for the settings to be applied. Run 'livelog' to see the progress.
app@levka6-appname-magweb-cmbl:~$ hypernode-log | head -n 2  # wait for update_node to finish
ACTION                        	START               	END                 	STATE   	TASKS	RUNNING
update_node                   	2022-01-06T15:50:12Z	2022-01-06T15:50:13Z	running 	2/4 	php_update_node_to_update_flow
app@levka6-appname-magweb-cmbl:~$ ls -lah /usr/local/bin/composer*
lrwxrwxrwx 1 root root    9 Jan  5 16:08 /usr/local/bin/composer -> composer2
-rwxr-xr-x 1 root root 2.0M Jan  5 16:09 /usr/local/bin/composer1
-rwxr-xr-x 1 root root 2.3M Jan  5 16:09 /usr/local/bin/composer2

 

And to switch back to composer 1:

app@levka6-appname-magweb-cmbl:~$ hypernode-systemctl settings composer_version 1.x
Operation was successful and is being processed. Please allow a few minutes for the settings to be applied. Run 'livelog' to see the progress.