作曲家版本降级问题
因此,我目前正在尝试建立一个旧的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:
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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
该消息告诉您,安装的当前版本的作曲家无法使用当前版本的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.