Instantly share code, notes, and snippets.

Embed
What would you like to do?
CakePHP3 upgrade shell
vagrant@precise64:/vagrant_data/App$ ./Console/cake upgrade
A shell to help automate upgrading from CakePHP 3.0 to 2.x.
Be sure to
have a backup of your application before running these commands.
Usage:
cake upgrade [subcommand] [-h] [-v] [-q]
Subcommands:
all Run all upgrade commands.
locations Move files/directories around. Run this *before*
adding namespaces with the namespaces command.
namespaces Add namespaces to files based on their file path.
Only run this *after* you have moved files with locations.
app_uses Replace App::uses() with use statements
rename_classes Rename classes that have been moved/renamed. Run
after replacing App::uses().
fixtures Update fixtures to use new index/constraint
features. This is necessary before running tests.
rename_collections Rename HelperCollection, ComponentCollection, and
TaskCollection. Will also rename component constructor arguments and
_Collection properties on all objects.
tests Rename test case assertion methods.
To see help on a subcommand use `cake upgrade [subcommand] --help`
Options:
--help, -h Display this help.
--verbose, -v Enable verbose output.
--quiet, -q Enable quiet output.
vagrant@precise64:/vagrant_data/App$ ./Console/cake upgrade all
Welcome to CakePHP v3.0.0-dev Console
---------------------------------------------------------------
App : App
Path: /vagrant_data/App/
---------------------------------------------------------------
Running locations
Running namespaces
Notice Error: Undefined index: namespace in [/vagrant_data/vendor/cakephp/cakephp/Cake/Console/Command/UpgradeShell.php, line 294]
2013-11-26 22:54:18 Notice: Notice (8): Undefined index: namespace in [/vagrant_data/vendor/cakephp/cakephp/Cake/Console/Command/UpgradeShell.php, line 294]
Trace:
Cake\Error\BaseErrorHandler::handleError() - CORE/Cake/Error/BaseErrorHandler.php, line 132
Cake\Console\Command\UpgradeShell::namespaces() - CORE/Cake/Console/Command/UpgradeShell.php, line 294
Cake\Console\Command\UpgradeShell::all() - CORE/Cake/Console/Command/UpgradeShell.php, line 67
Cake\Console\Shell::runCommand() - CORE/Cake/Console/Shell.php, line 440
Cake\Console\ShellDispatcher::_dispatch() - CORE/Cake/Console/ShellDispatcher.php, line 158
Cake\Console\ShellDispatcher::dispatch() - CORE/Cake/Console/ShellDispatcher.php, line 128
Cake\Console\ShellDispatcher::run() - CORE/Cake/Console/ShellDispatcher.php, line 70
[main] - APP/Console/cake.php, line 22
Done updating /vagrant_data/App/Config/Schema/db_acl.php
Done updating /vagrant_data/App/Config/Schema/i18n.php
Done updating /vagrant_data/App/Config/Schema/sessions.php
Done updating /vagrant_data/App/Config/acl.ini.php
Done updating /vagrant_data/App/Config/acl.php
Done updating /vagrant_data/App/Config/app.php
Done updating /vagrant_data/App/Config/bootstrap.php
Done updating /vagrant_data/App/Config/paths.php
Done updating /vagrant_data/App/Config/routes.php
Done updating /vagrant_data/App/Config_old/Schema/db_acl.php
Done updating /vagrant_data/App/Config_old/Schema/i18n.php
Done updating /vagrant_data/App/Config_old/Schema/schema.php
Done updating /vagrant_data/App/Config_old/Schema/sessions.php
Done updating /vagrant_data/App/Config_old/acl.ini.php
Done updating /vagrant_data/App/Config_old/acl.php
Done updating /vagrant_data/App/Config_old/bootstrap.php
Done updating /vagrant_data/App/Config_old/core.php
Done updating /vagrant_data/App/Config_old/database.php
Done updating /vagrant_data/App/Config_old/routes.php
Done updating /vagrant_data/App/Console/Command/AppShell.php
Done updating /vagrant_data/App/Console/Command/WeekendLancersShell.php
Done updating /vagrant_data/App/Console/Installer.php
Done updating /vagrant_data/App/Console_old/Command/AppShell.php
Done updating /vagrant_data/App/Console_old/Command/UpdateTweetShell.php
Done updating /vagrant_data/App/Controller/AppController.php
Done updating /vagrant_data/App/Controller/PagesController.php
Done updating /vagrant_data/App/Controller/PhotosController.php
Done updating /vagrant_data/App/Model/AppModel.php
Done updating /vagrant_data/App/Model/Photo.php
Done updating /vagrant_data/App/Model/User.php
Done updating /vagrant_data/App/Test/Fixture/PhotoFixture.php
Done updating /vagrant_data/App/Test/Fixture/UserFixture.php
Done updating /vagrant_data/App/Test/TestCase/Controller/PhotosControllerTest.php
Done updating /vagrant_data/App/Test/TestCase/Model/PhotoTest.php
Done updating /vagrant_data/App/Test/TestCase/Model/UserTest.php
Done updating /vagrant_data/App/View/Helper/AppHelper.php
Namespaces added successfully
Running app_uses
App::uses() replaced successfully
Running rename_classes
Class names updated.
Running fixtures
Processing fixtures on /vagrant_data/App/Test/Fixture/
Done updating /vagrant_data/App/Config/Schema/db_acl.php
Done updating /vagrant_data/App/Config/Schema/i18n.php
Done updating /vagrant_data/App/Config/Schema/sessions.php
Done updating /vagrant_data/App/Config/acl.ini.php
Done updating /vagrant_data/App/Config/acl.php
Done updating /vagrant_data/App/Config/app.php
Done updating /vagrant_data/App/Config/bootstrap.php
Done updating /vagrant_data/App/Config/paths.php
Done updating /vagrant_data/App/Config/routes.php
Done updating /vagrant_data/App/Config_old/Schema/db_acl.php
Done updating /vagrant_data/App/Config_old/Schema/i18n.php
Done updating /vagrant_data/App/Config_old/Schema/schema.php
Done updating /vagrant_data/App/Config_old/Schema/sessions.php
Done updating /vagrant_data/App/Config_old/acl.ini.php
Done updating /vagrant_data/App/Config_old/acl.php
Done updating /vagrant_data/App/Config_old/bootstrap.php
Done updating /vagrant_data/App/Config_old/core.php
Done updating /vagrant_data/App/Config_old/database.php
Done updating /vagrant_data/App/Config_old/routes.php
Done updating /vagrant_data/App/Console/Command/AppShell.php
Done updating /vagrant_data/App/Console/Command/WeekendLancersShell.php
Done updating /vagrant_data/App/Console/Installer.php
Done updating /vagrant_data/App/Console/cake.php
Done updating /vagrant_data/App/Console_old/Command/AppShell.php
Done updating /vagrant_data/App/Console_old/Command/UpdateTweetShell.php
Done updating /vagrant_data/App/Console_old/cake.php
Done updating /vagrant_data/App/Controller/AppController.php
Done updating /vagrant_data/App/Controller/PagesController.php
Done updating /vagrant_data/App/Controller/PhotosController.php
Done updating /vagrant_data/App/Model/AppModel.php
Done updating /vagrant_data/App/Model/Photo.php
Done updating /vagrant_data/App/Model/User.php
Done updating /vagrant_data/App/Test/Fixture/PhotoFixture.php
Done updating /vagrant_data/App/Test/Fixture/UserFixture.php
Done updating /vagrant_data/App/Test/TestCase/Controller/PhotosControllerTest.php
Done updating /vagrant_data/App/Test/TestCase/Model/PhotoTest.php
Done updating /vagrant_data/App/Test/TestCase/Model/UserTest.php
Done updating /vagrant_data/App/View/Helper/AppHelper.php
Done updating /vagrant_data/App/index.php
Done updating /vagrant_data/App/webroot/index.php
Done updating /vagrant_data/App/webroot/test.php
Done updating /vagrant_data/App/Config/Schema/db_acl.php
Done updating /vagrant_data/App/Config/Schema/i18n.php
Done updating /vagrant_data/App/Config/Schema/sessions.php
Done updating /vagrant_data/App/Config/acl.ini.php
Done updating /vagrant_data/App/Config/acl.php
Done updating /vagrant_data/App/Config/app.php
Done updating /vagrant_data/App/Config/bootstrap.php
Done updating /vagrant_data/App/Config/paths.php
Done updating /vagrant_data/App/Config/routes.php
Done updating /vagrant_data/App/Config/Schema/db_acl.php
Done updating /vagrant_data/App/Config/Schema/i18n.php
Done updating /vagrant_data/App/Config/Schema/sessions.php
Done updating /vagrant_data/App/Config_old/Schema/db_acl.php
Done updating /vagrant_data/App/Config_old/Schema/i18n.php
Done updating /vagrant_data/App/Config_old/Schema/schema.php
Done updating /vagrant_data/App/Config_old/Schema/sessions.php
Done updating /vagrant_data/App/Config_old/acl.ini.php
Done updating /vagrant_data/App/Config_old/acl.php
Done updating /vagrant_data/App/Config_old/bootstrap.php
Done updating /vagrant_data/App/Config_old/core.php
Done updating /vagrant_data/App/Config_old/database.php
Done updating /vagrant_data/App/Config_old/routes.php
Done updating /vagrant_data/App/Config_old/Schema/db_acl.php
Done updating /vagrant_data/App/Config_old/Schema/i18n.php
Done updating /vagrant_data/App/Config_old/Schema/schema.php
Done updating /vagrant_data/App/Config_old/Schema/sessions.php
Done updating /vagrant_data/App/Console/Command/AppShell.php
Done updating /vagrant_data/App/Console/Command/WeekendLancersShell.php
Done updating /vagrant_data/App/Console/Installer.php
Done updating /vagrant_data/App/Console/cake.php
Done updating /vagrant_data/App/Console/Command/AppShell.php
Done updating /vagrant_data/App/Console/Command/WeekendLancersShell.php
Done updating /vagrant_data/App/Console_old/Command/AppShell.php
Done updating /vagrant_data/App/Console_old/Command/UpdateTweetShell.php
Done updating /vagrant_data/App/Console_old/cake.php
Done updating /vagrant_data/App/Console_old/Command/AppShell.php
Done updating /vagrant_data/App/Console_old/Command/UpdateTweetShell.php
Done updating /vagrant_data/App/Controller/AppController.php
Done updating /vagrant_data/App/Controller/PagesController.php
Done updating /vagrant_data/App/Controller/PhotosController.php
Done updating /vagrant_data/App/Model/AppModel.php
Done updating /vagrant_data/App/Model/Photo.php
Done updating /vagrant_data/App/Model/User.php
Done updating /vagrant_data/App/Test/Fixture/PhotoFixture.php
Done updating /vagrant_data/App/Test/Fixture/UserFixture.php
Done updating /vagrant_data/App/Test/TestCase/Controller/PhotosControllerTest.php
Done updating /vagrant_data/App/Test/TestCase/Model/PhotoTest.php
Done updating /vagrant_data/App/Test/TestCase/Model/UserTest.php
Done updating /vagrant_data/App/Test/Fixture/PhotoFixture.php
Done updating /vagrant_data/App/Test/Fixture/UserFixture.php
Done updating /vagrant_data/App/Test/TestCase/Controller/PhotosControllerTest.php
Done updating /vagrant_data/App/Test/TestCase/Model/PhotoTest.php
Done updating /vagrant_data/App/Test/TestCase/Model/UserTest.php
Done updating /vagrant_data/App/Test/TestCase/Controller/PhotosControllerTest.php
Done updating /vagrant_data/App/Test/TestCase/Model/PhotoTest.php
Done updating /vagrant_data/App/Test/TestCase/Model/UserTest.php
Done updating /vagrant_data/App/View/Helper/AppHelper.php
Done updating /vagrant_data/App/View/Helper/AppHelper.php
Done updating /vagrant_data/App/webroot/index.php
Done updating /vagrant_data/App/webroot/test.php
Done updating /vagrant_data/App/Test/Fixture/PhotoFixture.php
Done updating /vagrant_data/App/Test/Fixture/UserFixture.php
Running rename_collections
Done updating /vagrant_data/App/Config/Schema/db_acl.php
Done updating /vagrant_data/App/Config/Schema/i18n.php
Done updating /vagrant_data/App/Config/Schema/sessions.php
Done updating /vagrant_data/App/Config/acl.ini.php
Done updating /vagrant_data/App/Config/acl.php
Done updating /vagrant_data/App/Config/app.php
Done updating /vagrant_data/App/Config/bootstrap.php
Done updating /vagrant_data/App/Config/paths.php
Done updating /vagrant_data/App/Config/routes.php
Done updating /vagrant_data/App/Config_old/Schema/db_acl.php
Done updating /vagrant_data/App/Config_old/Schema/i18n.php
Done updating /vagrant_data/App/Config_old/Schema/schema.php
Done updating /vagrant_data/App/Config_old/Schema/sessions.php
Done updating /vagrant_data/App/Config_old/acl.ini.php
Done updating /vagrant_data/App/Config_old/acl.php
Done updating /vagrant_data/App/Config_old/bootstrap.php
Done updating /vagrant_data/App/Config_old/core.php
Done updating /vagrant_data/App/Config_old/database.php
Done updating /vagrant_data/App/Config_old/routes.php
Done updating /vagrant_data/App/Console/Command/AppShell.php
Done updating /vagrant_data/App/Console/Command/WeekendLancersShell.php
Done updating /vagrant_data/App/Console/Installer.php
Done updating /vagrant_data/App/Console/cake.php
Done updating /vagrant_data/App/Console_old/Command/AppShell.php
Done updating /vagrant_data/App/Console_old/Command/UpdateTweetShell.php
Done updating /vagrant_data/App/Console_old/cake.php
Done updating /vagrant_data/App/Controller/AppController.php
Done updating /vagrant_data/App/Controller/PagesController.php
Done updating /vagrant_data/App/Controller/PhotosController.php
Done updating /vagrant_data/App/Model/AppModel.php
Done updating /vagrant_data/App/Model/Photo.php
Done updating /vagrant_data/App/Model/User.php
Done updating /vagrant_data/App/Test/Fixture/PhotoFixture.php
Done updating /vagrant_data/App/Test/Fixture/UserFixture.php
Done updating /vagrant_data/App/Test/TestCase/Controller/PhotosControllerTest.php
Done updating /vagrant_data/App/Test/TestCase/Model/PhotoTest.php
Done updating /vagrant_data/App/Test/TestCase/Model/UserTest.php
Done updating /vagrant_data/App/View/Helper/AppHelper.php
Done updating /vagrant_data/App/index.php
Done updating /vagrant_data/App/webroot/index.php
Done updating /vagrant_data/App/webroot/test.php
Done updating /vagrant_data/App/Config/Schema/db_acl.php
Done updating /vagrant_data/App/Config/Schema/i18n.php
Done updating /vagrant_data/App/Config/Schema/sessions.php
Done updating /vagrant_data/App/Config/acl.ini.php
Done updating /vagrant_data/App/Config/acl.php
Done updating /vagrant_data/App/Config/app.php
Done updating /vagrant_data/App/Config/bootstrap.php
Done updating /vagrant_data/App/Config/paths.php
Done updating /vagrant_data/App/Config/routes.php
Done updating /vagrant_data/App/Config/Schema/db_acl.php
Done updating /vagrant_data/App/Config/Schema/i18n.php
Done updating /vagrant_data/App/Config/Schema/sessions.php
Done updating /vagrant_data/App/Config_old/Schema/db_acl.php
Done updating /vagrant_data/App/Config_old/Schema/i18n.php
Done updating /vagrant_data/App/Config_old/Schema/schema.php
Done updating /vagrant_data/App/Config_old/Schema/sessions.php
Done updating /vagrant_data/App/Config_old/acl.ini.php
Done updating /vagrant_data/App/Config_old/acl.php
Done updating /vagrant_data/App/Config_old/bootstrap.php
Done updating /vagrant_data/App/Config_old/core.php
Done updating /vagrant_data/App/Config_old/database.php
Done updating /vagrant_data/App/Config_old/routes.php
Done updating /vagrant_data/App/Config_old/Schema/db_acl.php
Done updating /vagrant_data/App/Config_old/Schema/i18n.php
Done updating /vagrant_data/App/Config_old/Schema/schema.php
Done updating /vagrant_data/App/Config_old/Schema/sessions.php
Done updating /vagrant_data/App/Console/Command/AppShell.php
Done updating /vagrant_data/App/Console/Command/WeekendLancersShell.php
Done updating /vagrant_data/App/Console/Installer.php
Done updating /vagrant_data/App/Console/cake.php
Done updating /vagrant_data/App/Console/Command/AppShell.php
Done updating /vagrant_data/App/Console/Command/WeekendLancersShell.php
Done updating /vagrant_data/App/Console_old/Command/AppShell.php
Done updating /vagrant_data/App/Console_old/Command/UpdateTweetShell.php
Done updating /vagrant_data/App/Console_old/cake.php
Done updating /vagrant_data/App/Console_old/Command/AppShell.php
Done updating /vagrant_data/App/Console_old/Command/UpdateTweetShell.php
Done updating /vagrant_data/App/Controller/AppController.php
Done updating /vagrant_data/App/Controller/PagesController.php
Done updating /vagrant_data/App/Controller/PhotosController.php
Done updating /vagrant_data/App/Model/AppModel.php
Done updating /vagrant_data/App/Model/Photo.php
Done updating /vagrant_data/App/Model/User.php
Done updating /vagrant_data/App/Test/Fixture/PhotoFixture.php
Done updating /vagrant_data/App/Test/Fixture/UserFixture.php
Done updating /vagrant_data/App/Test/TestCase/Controller/PhotosControllerTest.php
Done updating /vagrant_data/App/Test/TestCase/Model/PhotoTest.php
Done updating /vagrant_data/App/Test/TestCase/Model/UserTest.php
Done updating /vagrant_data/App/Test/Fixture/PhotoFixture.php
Done updating /vagrant_data/App/Test/Fixture/UserFixture.php
Done updating /vagrant_data/App/Test/TestCase/Controller/PhotosControllerTest.php
Done updating /vagrant_data/App/Test/TestCase/Model/PhotoTest.php
Done updating /vagrant_data/App/Test/TestCase/Model/UserTest.php
Done updating /vagrant_data/App/Test/TestCase/Controller/PhotosControllerTest.php
Done updating /vagrant_data/App/Test/TestCase/Model/PhotoTest.php
Done updating /vagrant_data/App/Test/TestCase/Model/UserTest.php
Done updating /vagrant_data/App/View/Helper/AppHelper.php
Done updating /vagrant_data/App/View/Helper/AppHelper.php
Done updating /vagrant_data/App/webroot/index.php
Done updating /vagrant_data/App/webroot/test.php
Collection class uses renamed successfully.
@yandod

This comment has been minimized.

Owner

yandod commented Nov 26, 2013

App/Console App/Config App/Controller/AppController.php
の3つについてはCakePHP3のプロジェクトからコピーしないとシェル自体が起動しなかった。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment