Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I'm getting the following error in a project I'm setting up:

You are using Composer 2, which some of your plugins seem to be incompatible with. Make sure you update your plugins or report a plugin-issue to ask them to support Composer 2.

I've started at a new company this week, just trying to get their projects installed and there doesn't seem to be a way to change my composer version on Windows. I'd rather not update all their packages as I'm not familiar with the projects yet and have no clue what kind of implications go into that.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
415 views
Welcome To Ask or Share your Answers For Others

1 Answer

Assuming a regular composer installation, to rollback to version 1 of composer, you simply execute:

composer self-update --1

When you want to go back to version 2 (which you should, after updating or removing the incompatible plugins):

composer self-update --2

The above will take you to the latest on any of the two major versions.

You can also "update" to a specific version just by passing the version number to self-update:

composer self-update 1.10.12
composer self-update 2.0.7

And finally after performing any self-update, you can specify --rollback to go back to the previously installed version.

composer self-update
composer self-update --rollback

Finally, if you are feeling adventurous, you can update to a pre-release version by executing:

composer self-update --preview

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...