作曲家版本降级问题

发布于 2025-02-02 03:02:13 字数 400 浏览 2 评论 0原文

因此,我目前正在尝试建立一个旧的Laravel项目,该项目需要PHP 7.1。我已成功将8.1降至7.1,但是现在出现了作曲家问题: “在此处输入图像说明”

我试图在项目上运行作曲家安装,以安装所需的依赖项,但我面临着作曲家版本错误。运行建议的命令后,它基本上显示出相同的错误,这实际上没有任何意义。我尝试了其他命令,但似乎问题是相同的。

我正在使用Mac。

有什么想法吗?

So I am currently trying to set up an old Laravel project, which requires PHP 7.1. I have successfully downgraded from 8.1 to 7.1, but now the composer issue appears:enter image description here

I am trying to run composer install on a project, in order to install the dependecies needed, but I am facing the composer version error. After running the suggested command, it basically shows the same error, which does not really make any sense. I have tried other commands but seems like the issue is the same.

I am using MAC.

Any idea?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

記憶穿過時間隧道 2025-02-09 03:02:13

该消息告诉您,安装的当前版本的作曲家无法使用当前版本的PHP安装。甚至不可能降级。

为了克服这一点,您可以再次将PHP更新为任何受支持的版本(如:7.2.5或更高版本),然后将作曲家降低到v2.2,然后再次将PHP降级到7.1。

如果要简化PHP版本之间的开关,则可以使用Docker检查容器化的PHP设置。

The message tells you that the current version of Composer installed cannot be run with the current version of PHP installed. Even downgrading is not possible.

To overcome this, you could update PHP again to any supported version (as in: 7.2.5 or later), then downgrade Composer to v2.2, then downgrade PHP again to 7.1.

If you want to ease the switch between PHP versions, you could check for a containerized PHP setup using Docker.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文