Symptoms
When accessing Plesk > Domains > example.com > PHP Composer page, the following error message is displayed:
Could not update the integration plugin
Changed current directory to /var/www/vhosts/example.com/.composer
[InvalidArgumentException]
Package plesk/composer-command-info at version ~1.0.2 has a PHP requirement incompatible with your PHP version, PHP extensions and Composer versionPHP Composer extension of version 1.1.0 or later is installed on the server. It can be checked in Extensions > My Extensions > PHP Composer.
Cause
The older version of Composer is used by default despite Composer was updated to v2.0:
# composer --version
Composer version 2.0-dev
Resolution
Go to Extenions > My Extensions > Panel.ini Editor > Open.
Note: If Panel.ini Editor extension is not installed, install it from the Extensions menu in Plesk.
Switch to the Editor tab.
Specify the Composer and plugin versions by adding the lines below at the end of the file as below:
[ext-composer]
commandInfoPluginVersion = "~1.1.0"
composerVersion = '2'
Solution via CLI
1. Connect to a Plesk server via SSH.
2. Сheck panel.ini file availability:
# ls -l /usr/local/psa/admin/conf/panel.ini
If the file
/usr/local/psa/admin/conf/panel.inidoes not exist or is empty, create it by copying the sample configuration file/usr/local/psa/admin/conf/panel.ini:# cp /usr/local/psa/admin/conf/panel.ini.sample /usr/local/psa/admin/conf/panel.ini
3. Open /usr/local/psa/admin/conf/panel.ini file via any text editor, for example, vi text editor:
# vi /usr/local/psa/admin/conf/panel.ini
3. Specify the required composer and plugin versions by adding lines below to the end of the file:
[ext-composer]
commandInfoPluginVersion = "~1.1.0"
composerVersion = '2'
4. Save the changes and close the file.