1
我試圖我的CakePHP 2應用程序升級到CakePHP的3升級CakePHP的2個應用程序 - > CakePHP的3應用程序,`無法聲明應用程序,因爲名稱已經在use`
我使用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
升級插件位於/ usr/share/nginx/html/upgrade中,我在/ bin中安裝了composer.phar,並使用它來安裝升級工具,位於/ usr/share/nginx/html /升級,我跑了所有的 'bin/cake升級[填空] ../ web' 命令 – user904542
我確實有舊的cakephp 2版本的我的應用程序的備份 – user904542
那麼我用get_include_path來查找我的php包含路徑,並在/ usr/share/path中找到它,然後在ls那裏找到並發現: 7.0 7.1歸檔Cake Console數據文檔OS PEAR pearcmd.php PEAR.php peclcmd.php PHP結構System.php運行'sudo find -name Cake'的XML 那個文件夾給了我這個: ./Cake ./data/CakePHP/Cake – user904542