将Cakephp项目从Cakephp 2.6.2升级到3.8的最佳方法 [英] Best way to upgrade a Cakephp project from Cakephp 2.6.2 to 3.8

查看:92
本文介绍了将Cakephp项目从Cakephp 2.6.2升级到3.8的最佳方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的任务是将旧系统从Cakephp2.6.2升级到Cakephp3.8.显然,这2个有很大的不同,但是有没有一种简单的方法来使旧项目与新的Cake版本一起使用?还是有人可以引导我朝正确的方向寻求最佳方法呢?

I have been tasked with upgrading a legacy system from Cakephp2.6.2 to Cakephp3.8. Obviously the 2 are drastically different but is there a simple way of getting the old project to work with the new cake version? Or could anyone steer me in the right direction for the best way to do this?

推荐答案

没有通用的最佳方法"适合所有人.最好的方法是最简单的方法来使您的特定应用程序正常运行,但这是您需要自己确定的事情.

There is no generic "best way" that fits all. The best way is the easiest way for your specific application that results in a properly working application, but that's something that you need to determine for yourself.

有一个 升级工具 可以自动化 some 的重复内容,例如更改目录结构,重命名类,添加名称空间等,但是在99.999999%的情况下,结果将无法正常工作,您仍然可以很多手动迁移要做.它的多少以及它的复杂程度完全取决于您的应用程序,这可能相当简单,但是它也可能是如此复杂,以至于从头重写可能是更好的选择.

There's an upgrade tool that can automate some of the repetitive stuff, like changing directory structures, renaming classes, adding namespaces, etc, but in 99.999999% of all cases the result will not be a working application, you'll still have lots of manual migration to do. How much that is, and how complicated it might be, totally depends on your application, it might be rather simple, but it can also be so complicated that rewriting from scratch might be the better choice.

恕我直言,您首先应该使自己熟悉CakePHP 3.x,以便可以自信地创建健壮的应用程序.熟悉CakePHP 3.x后,您可能会遇到许多有关升级的问题.

IMHO you should first make yourself familiar with CakePHP 3.x, to the point where you are able to confidently create robust applications. Lots of questions that you may have about upgrading will solve themselves once you are familiar with CakePHP 3.x.

这篇关于将Cakephp项目从Cakephp 2.6.2升级到3.8的最佳方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆