改变 composer.json 蛋糕 3 稳定

change composer.json for cake 3 stable

现在CakePHP 3 有稳定版了。我应该如何更改我的 composer.json?我只想使用蛋糕的稳定更新。

"require": {
  "php": ">=5.4.16",
  "cakephp/cakephp": "3.0.*-dev",
  "cakephp/migrations": "dev-master",
  "cakephp/plugin-installer": "*",
  "cakephp/bake": "dev-master",
  "mobiledetect/mobiledetectlib": "2.*",
  "phpunit/phpunit": "*"
},
"require-dev": {
  "d11wtq/boris": "1.0.*",
  "cakephp/debug_kit": "3.0.*-dev",
  "cakephp/bake": "dev-master"
}

查看官方应用库中的那个:

https://github.com/cakephp/app/blob/master/composer.json

您可能还想替换 ConsoleShell,因为它在上一个版本之前得到了改进:

https://github.com/cakephp/app/blob/master/src/Shell/ConsoleShell.php

您将需要同时更新 cakephp 条目和 debug_kit 条目,否则它们的依赖项将停留在 cake3-dev。这样做对我有用(只显示相关条目):

"require": { "cakephp/cakephp": "~3.0"

}, "require-dev":{ "cakephp/debug_kit":“~3.0” }