• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Question Plesk Composer v2.0.0

WebHostingAce

Silver Pleskian
Hi,

I'm having trouble using the Plesk Composer version 2.0.0 (CentOS 7.7 | Version 18.0.25 Update #2). This is not compatible with my software.

Is this Composer v2.0.0 by Plesk?

Also I'm not able to find this version in the official Composer website - Composer

I replaced composer.phar with official version of 1.10.5 and everything works fine now.

Could you please advise. @IgorG

Thank you!
 
Server 1 - CentOS 7.7 | Version 18.0.25 Update #2 -

-bash-4.2$ composer --version
The "magento/magento-composer-installer" plugin was skipped because it requires a Plugin API version ("^1.0") that does not match your Composer installation ("2.0.0"). You may need to run composer update with the "--no-plugins" option.
Composer version 2.0-dev (2.0-dev+eaf31e4f5cc02dc32943e84b8b298f2b26ce2193) 2020-04-08 16:13:21

Server 2 - CentOS 7.7 | Version 18.0.25 Update #2

-bash-4.2$ composer --version
Composer version 1.10.5 2020-04-10 11:44:22

This is really confusing.....

How did this Server 1 get v2.0.0?

There are few other servers showing Composer v2.0.0 and other showing v1.10.5

I havent used any external Repos other than MariaDB Repo.
 
Last edited:
We have the same with Plesk onyx. See my post there.
Composer 2.0-dev was released yust two days ago. Seems we have a lousy package management of plesk here which also uses the lates version. And as where are within easter at the moment, the plesk deployment routines run actually amok. I think we have to wait some days (hopefully not weeks) to get this fixed by having a working environment again.
 
Yes, that works as a workaround.
But plesk has to fix it's release managment for packages.
Otherwise we will receive an apache-3.0-alpha1 one day.
And I don't want that on a production system...
 
Anyone knows where Plesk does the updating of the composer plugin. I want to add the --1 flag to force i to the 1.x version ?
 
We work with a Stable composer (latest version 1.10), and we are not working with version 2.0

As a temporary workaround, the composer version can be downgraded to version 1.10.1:
  1. Run the command below:
    # composer self-update 1.10.1
  2. Download the necessary version of the file:
    # wget https://getcomposer.org/composer-stable.phar
  3. Make a backup of the previous file:
    # mv /usr/lib64/plesk-9.0/composer.phar{,.bak}
  4. Move the downloaded file to the necessary directory:
    # mv composer-stable.phar /usr/lib64/plesk-9.0/composer.phar
  5. Add permission for execution:
    # chmod +x /usr/lib64/plesk-9.0/composer.phar
 
  • Like
Reactions: rik
@IgorG i downgrade by running:

# /opt/plesk/php/7.2/bin/php /usr/lib64/plesk-9.0/composer.phar self-update --rollback

And then updated to the latest 1.x release using :

# /opt/plesk/php/7.2/bin/php /usr/lib64/plesk-9.0/composer.phar self-update --1

(I think this is beter than manually replacing it?)

Latest version at the moment is: 1.10.5

But it looks like Plesk updated the composer version to 2.0-dev itself. We do not have any custom cron running to update composer and did not have any issues yesterday. So something happend in between. So how does Plesk update composer ?
 
We work with a Stable composer (latest version 1.10), and we are not working with version 2.0

As a temporary workaround, the composer version can be downgraded to version 1.10.1:
  1. Run the command below:
    # composer self-update 1.10.1
  2. Download the necessary version of the file:
    # wget https://getcomposer.org/composer-stable.phar
  3. Make a backup of the previous file:
    # mv /usr/lib64/plesk-9.0/composer.phar{,.bak}
  4. Move the downloaded file to the necessary directory:
    # mv composer-stable.phar /usr/lib64/plesk-9.0/composer.phar
  5. Add permission for execution:
    # chmod +x /usr/lib64/plesk-9.0/composer.phar
@IgorG somehow some servers were updated to "Composer version 2.0-dev" Could you please check how could this be possible?
 
Hello everyone,

I am also facing the similar issue

composer version is getting updated automatically to version 2.x.x periodically.
running "composer self-update" command is bringing back to the stable channel (1.x.x) and i which is the version i want my applications to keep running.

i am not sure why that composer version is being updated automatically to 2.x.x

Thanks
 
Thanks everyone for the solutions, this is also an issue with a brand new Plesk install. Running the following (Debian 9)

Code:
/opt/plesk/php/7.2/bin/php /usr/lib/plesk-9.0/composer.phar self-update --1

allowed me to switch back to the v1 channel.
 
Hi people, I'm having the same problem. How can I remove the version of Composer that came with Plesk and replace with a version that DOES work??

(Debian 8.11 / Plesk Obsidian Version 18.0.28)
 
@marvin
run as root
Code:
composer self-update
or depending on php version used:
Code:
/opt/plesk/php/7.2/bin/php /usr/lib/plesk-9.0/composer.phar self-update --1

The issue does come back after updates in Plesk every now and then.
 
@marvin
run as root
Code:
composer self-update
or depending on php version used:
Code:
/opt/plesk/php/7.2/bin/php /usr/lib/plesk-9.0/composer.phar self-update --1

The issue does come back after updates in Plesk every now and then.

So I'm trying to run Composer from a individual 'account' within my VPS. The response I get is bash: composer: command not found. So I say which composer and it says bash: which: command not found. So I think, OK, I'll install Composer within this specific directory; then it will surely find Composer!

So I go bash-4.3$ php composer-setup.php and it replies bash: php: command not found...

I then try bash-4.3$ which php and it replies bash: which: command not found

So let's LOOK for PHP; bash-4.3$ locate -c php

bash: locate: command not found


Maybe it doesn't understand 'locate'? Let's make it simpler: bash-4.3$ find /usr -name 'php'

bash: find: command not found


I'm starting to wonder how this VPS actually manages to do anything at all? Very depressing!
 
@marvin looks like you have selected /bin/bash(Chrooted).

Select "/bin/bash" in "Web Hosting Access"

Also create a,

".bash_profile" in the "Home directory" with,
Code:
export PATH=/opt/plesk/php/7.4/bin:$PATH
alias composer='/opt/plesk/php/7.4/bin/php /usr/lib64/plesk-9.0/composer.phar'
cd httpdocs

To access the composer.
 
Last edited:
My composer also updated to 2.0.someting and now I can't update/do anything with my magento2 sites.
Non of the above solves my issue.
Plesk team please advice.
 
You can run (something like) /opt/plesk/php/7.4/bin/php /usr/lib64/plesk-9.0/composer.phar --1 to downgrade to v1.x
Look in the schedules task list for composer and schedule the above command after the one from plesk to keep it on v1.
 
@marvin looks like you have selected /bin/bash(Chrooted).

Select "/bin/bash" in "Web Hosting Access"

Also create a,

".bash_profile" in the "Home directory" with,
Code:
export PATH=/opt/plesk/php/7.4/bin:$PATH
alias composer='/opt/plesk/php/7.4/bin/php /usr/lib64/plesk-9.0/composer.phar'
cd httpdocs

To access the composer.

Well, after days of banging my head on my screen, with the help of my CMS software community forum (thanks Silverstripe) I discovered a simple solution that works (in my case at least).

Using Terminal for Mac (or similar equivalent on other systems) SSH into your VPS account. Instead of running the command composer whatever-you-want-to-do go php composer.phar whatever-you-want-to-do

Not particularly elegant but it worked for me...
 
Back
Top