Symptoms
-
In an attempt to access Plesk > Domains > example.com > PHP Composer the error below is shown:
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Root composer.json requires plesk/composer-command-info ~1.0.2 -> satisfiable by plesk/composer-command-info[1.0.2].
- plesk/composer-command-info 1.0.2 requires composer-plugin-api ^1.1 -> found composer-plugin-api[2.0.0] but it does not match your constraint. - The composer was unexpectedly updated to 2.0 version:
# composer --version
Composer version 2.0-dev
Cause
This is a Composer extension bug with the ID #EXTPHPCOMP-122.
Fixed in:
Resolution
Please consider updating your server:
Workaround
If update is not possible for some reason you may try the following
workaround
As a workaround downgrade composer to 1.10.1 version by applying the steps below:
-
Log into the server via SSH.
-
Add in
/usr/local/psa/admin/conf/panel.ini
, the next text:[composer]
downloadUrl = https://getcomposer.org/composer-stable.pharNote: If there's already an existing
[composer]
section, do not add again the tag[composer]
but add thedownloadUrl
right under the existing section. -
Execute:
# plesk daily ComposerSelfUpdate
-
Verify the composer version:
# composer --version