如何降级或安装特定版本的Composer? [英] How to downgrade or install a specific version of Composer?

查看:122
本文介绍了如何降级或安装特定版本的Composer?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在设置的项目中出现以下错误:

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

您正在使用Composer 2,您的某些插件似乎与它们不兼容.确保更新插件或报告插件问题,以要求它们支持Composer 2.

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.

我本周开始在一家新公司工作,只是试图安装他们的项目,似乎没有办法在Windows上更改我的作曲家版本.我宁愿不更新他们的所有软件包,因为我还不熟悉这些项目,也不知道会有什么影响.

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.

推荐答案

假设常规的作曲家安装,要回滚到作曲家的版本1,只需执行以下操作:

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

composer self-update --1

当您想返回到版本2(更新或删除不兼容的插件后应该使用):

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.

您还可以更新"只需将版本号传递给 self-update :

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

最后,在执行任何自我更新之后,您可以指定-rollback 以返回到先前安装的版本.

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

这篇关于如何降级或安装特定版本的Composer?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆