Cakephp with PHP7

∥☆過路亽.° 提交于 2019-12-23 09:34:59

问题


Can I run CakePHP 1.3 with PHP7? I have to do a migration to PHP7, but in the hosting there is a project in CakePHP 1.3 and need to know if there is any risk if I run this project in this version of PHP.


回答1:


Unfortunately CakePHP 1.3 is not really compatible with PHP7 out of the box. I work on a old project in CakePHP 1.3 and my system upgraded to PHP7. There are a lot of these in the core of CakePHP 1.3

After changing these, I ran into the next batch of errors, after which I rolled back and postponed the upgrade.

So to answer the question, it would be rather risky upgrading to PHP7 if there is a CakePHP 1.3 project.




回答2:


If you are still looking for a CakePHP 1.3 port to PHP7, you are in luck!

I've ported CakePHP 1.3.21 to PHP 7.3, you can check it out on GitHub.

Please pay attention to the readme, as it naturally requires changes to your own code as well!




回答3:


I had to migrate a CakePHP 1.3 project to PHP7 and the only thing I did was find the "String" class and using PhpStorm's rename all occurrences feature I renamed it to "String_Renamed" that fixed the errors and everything worked afterwards. I've had no issues since.



来源:https://stackoverflow.com/questions/35631341/cakephp-with-php7

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!