将 Cake 1.3 迁移到 Cake 2.0

发布于 2025-01-06 12:58:43 字数 1437 浏览 0 评论 0原文

我在这里阅读了该指南:http://book。 cakephp.org/2.0/en/appendices/2-0-migration-guide.html 描述了 Cake 2.0 版本的更改,但没有明确说明如何进行升级。

我还看到了这个: http:// book.cakephp.org/2.0/en/console-and-shells/upgrade-shell.html#upgrade-shell 我认为这会提供更多说明。

到目前为止,这就是我对服务器上现有版本(1.3)所做的事情。

  1. 从这里的存储库中获取 2.0 的压缩副本: https://github.com/cakephp/ cakephp/tree/2.0
  2. 将新的 index.php 文件添加到我的 webroot 中
  3. 注意到新的 cake core 文件夹存在于父目录 lib 中的一层,因此它是(webroot)/lib/Cake 而不是 (webroot)/cake。因此,现在在我的 webroot 中,我有旧的 '/cakecore,现在有一个名为/lib的文件夹,其中包含新的 core (2.0) 和我的旧 '/app 文件夹以及旧的“/vendors”文件夹。
  4. 我从/lib/Cake/Console内部运行了这个命令:./Console/cake update all,它滚动了一堆像这样的东西:

    更新完成 /home/bob_cobb/public_html/mydomain.com/lib/Cake/TestSuite/CakeTestSuite.php

  5. 这并没有改变我原来的 /app 文件夹中的任何内容,因为所有控制器仍然是下划线和小写的。

我在这里缺少什么?我重命名了旧的 /cake 核心文件夹,该网站停止工作,所以它显然仍然依赖于此。我是否应该放弃所有内容并重新开始(完全删除 1.3,同时保存所有旧文件,然后使用新版本的 2.0 重新创建它们)?

任何有关如何进行迁移过程的建议都会有很大帮助。我预计有些事情将不再起作用,但我只需要朝着正确的方向推动。谢谢。

I read over the guide here: http://book.cakephp.org/2.0/en/appendices/2-0-migration-guide.html which describes the changes to Cake for version 2.0, but it doesn't explicitly say how to make the upgrade.

I also saw this: http://book.cakephp.org/2.0/en/console-and-shells/upgrade-shell.html#upgrade-shell which I figured would give a little more instruction.

So far this is what I've done to the existing version (1.3) on my server.

  1. Went and grabbed the zipped copy of 2.0 from the repo here: https://github.com/cakephp/cakephp/tree/2.0
  2. Added the new index.php file into my webroot
  3. Noticed that the new cake core folder exists one level within the parent directory lib so it's (webroot)/lib/Cake instead of (webroot)/cake. So now in my webroot I have my old '/cakecore, and now a folder called/libwhich contains the new core (2.0) and my old '/app folder as well as the old '/vendors` folder.
  4. I ran from inside /lib/Cake/Console this command: ./Console/cake upgrade all which scrolled a bunch of stuff like:

    Done updating
    /home/bob_cobb/public_html/mydomain.com/lib/Cake/TestSuite/CakeTestSuite.php

  5. This didn't change anything in my original /app folder as all controllers are still underscored and lowercase.

What am I missing here? I renamed my old /cake core folder and the site stopped working, so it's obviously still relying on that. Should I just scrap everything and start over (delete 1.3 completely while saving all my old files and just re-create them with a fresh version of 2.0)?

Any advice on how to get this migration process going would help greatly. I expect a few things to not work anymore, but I just need a push in the right direction. Thanks.

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

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

发布评论

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

评论(1

獨角戲 2025-01-13 12:58:43

如果您使用核心版本,您可能需要做的不仅仅是运行升级 shell 来实现这一目标。

我使用增强版本,只需单击一下即可转换所有内容。
请参阅“使用升级 shell 进行升级”@
http://www.dereuromark.de/2011/ 10/31/freshly-baked-cake2-0-tips/

但最重要的是,您应该始终从应用程序目录运行脚本,

 app2.0dir>..\lib\Cake\Console\cake Upgrade ...

这样它将找到正确的路径

If you use the core one you might need to do more than just run the upgrade shell to make that happen.

I use an enhanced version which should convert everything with a single click.
See "Upgrade using the upgrade shell" @
http://www.dereuromark.de/2011/10/31/freshly-baked-cake2-0-tips/

But most importantly you should always run your scripts from the app dir

 app2.0dir>..\lib\Cake\Console\cake Upgrade ...

This way it will find the correct paths

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