【发布时间】:2017-05-20 08:44:09
【问题描述】:
我在尝试将我的 cakephp 2 应用程序升级到 cakephp 3 时遇到问题。
我正在使用 PHP 7.1 & Ubuntu 16 和 nginx/1.10.0 (Ubuntu)
我收到以下错误...
Fatal error: Cannot declare class lib\Cake\Core\App because the name is already in use in /usr/share/nginx/html/web/lib/Cake/Core/App.php on line 70
我正在关注这个页面:https://github.com/cakephp/upgrade
我首先使用这些命令:
bin/cake upgrade locations [path]
bin/cake upgrade namespaces [path]
bin/cake upgrade app_uses [path]
bin/cake upgrade rename_classes [path]
bin/cake upgrade rename_collections [path]
bin/cake upgrade method_names [path]
bin/cake upgrade method_signatures [path]
bin/cake upgrade fixtures [path]
bin/cake upgrade tests [path]
bin/cake upgrade i18n [path]
bin/cake upgrade skeleton [path]
bin/cake upgrade prefixed_templates [path]
更多细节:
我的php版本是(php -v的输出)是:
PHP 7.1.0-5+deb.sury.org~xenial+1 (cli) ( NTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.1.0-dev, Copyright (c) 1998-2016 Zend Technologies
with Zend OPcache v7.1.0-5+deb.sury.org~xenial+1, Copyright (c) 1999-2016, by Zend Technologies
with Xdebug v2.5.0, Copyright (c) 2002-2016, by Derick Rethans
而我的 ubuntu 版本(lsb_release -a 的输出)是:
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.1 LTS
Release: 16.04
Codename: xenial
【问题讨论】:
-
现在面临同样的问题...您设法解决问题了吗?
标签: php cakephp cakephp-2.0 cakephp-3.0 php-7