CakePHP 3.8.10升级到4.x期间发生冲突错误

问题描述 投票:1回答:1

我想升级我们项目背后的CakePHP框架。当前,我们正在使用3.8.10版本。我完成了所有步骤以完成此处描述的过程:https://book.cakephp.org/4/en/appendices/4-0-upgrade-guide.html(我的代码中没有错误,警告或注意事项)

所有步骤都很好,但是最后一步。

我运行以下命令后:

php composer.phar require --update-with-dependencies “cakephp/cakephp:4.0.*”

我收到以下错误消息:

Problem 1
- cakephp/bake 1.12.0 requires cakephp/cakephp ^3.8.0 -> satisfiable by cakephp/cakephp[3.8.0, 3.8.0-RC1, 3.8.0-RC2, 3.8.0-RC3, 3.8.0-beta1, 3.8.1, 3.8.10, 3.8.2, 3.8.3, 3.8.4, 3.8.5, 3.8.6, 3.8.7, 3.8.8, 3.8.9, 3.x-dev] but these conflict with your requirements or minimum-stability.
- cakephp/bake 1.12.0 requires cakephp/cakephp ^3.8.0 -> satisfiable by cakephp/cakephp[3.8.0, 3.8.0-RC1, 3.8.0-RC2, 3.8.0-RC3, 3.8.0-beta1, 3.8.1, 3.8.10, 3.8.2, 3.8.3, 3.8.4, 3.8.5, 3.8.6, 3.8.7, 3.8.8, 3.8.9, 3.x-dev] but these conflict with your requirements or minimum-stability.
- cakephp/bake 1.12.0 requires cakephp/cakephp ^3.8.0 -> satisfiable by cakephp/cakephp[3.8.0, 3.8.0-RC1, 3.8.0-RC2, 3.8.0-RC3, 3.8.0-beta1, 3.8.1, 3.8.10, 3.8.2, 3.8.3, 3.8.4, 3.8.5, 3.8.6, 3.8.7, 3.8.8, 3.8.9, 3.x-dev] but these conflict with your requirements or minimum-stability.
- Installation request for cakephp/bake (locked at 1.12.0, required as ^1.9.0) -> satisfiable by cakephp/bake[1.12.0].

您能帮我找出问题吗?我在做什么错?

php cakephp-3.x cakephp-4.x
1个回答
0
投票

Cakephp github repository上已经列出了类似的问题

要解决此问题,您需要使用"cakephp/bake": "4.x-dev"

OR

暂时,您还需要在composer.json中添加以下设置,直到migrationstwig-view插件获得兼容CakePHP 4的新稳定版本:

"minimum-stability": "dev",
"prefer-stable": true

您可以检查以下链接

https://github.com/cakephp/cakephp/issues/13114

https://github.com/cakephp/cakephp/issues/14043

https://github.com/cakephp/app/blob/4.0.0-alpha1/composer.json

© www.soinside.com 2019 - 2024. All rights reserved.