Plesk

PHP Composer extension is not accessible in Plesk after Composer upgrade to v2.0: Package plesk/composer-command-info has a PHP requirement incompatible with your PHP version, PHP extensions and Composer version

Symptoms

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

  1. Log into Plesk.

  2. 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.

  3. Switch to the Editor tab.

  4. 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.ini does 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.

Exit mobile version