This plugin provides the UpgradeShell to help automate upgrading applications from CakePHP 1.3 to 2.0.
Install the plugin using Composer:
composer require --dev pieceofcake2/upgradeLoad the plugin in your app/Config/bootstrap.php:
CakePlugin::load('Upgrade');Then run the upgrade shell:
# Run all upgrade commands
app/Console/cake upgrade all
# Run specific upgrade command
app/Console/cake upgrade tests
app/Console/cake upgrade locations
app/Console/cake upgrade i18n
app/Console/cake upgrade helpers
app/Console/cake upgrade basics
app/Console/cake upgrade request
app/Console/cake upgrade configure
app/Console/cake upgrade constants
app/Console/cake upgrade controller_redirects
app/Console/cake upgrade components
app/Console/cake upgrade exceptions--plugin,-p: The plugin to update. Only the specified plugin will be updated.--ext,-e: The extension(s) to search. A pipe delimited list, or a preg_match compatible subpattern (default:php|ctp|thtml|inc|tpl)--git,-g: Use git command for moving files around.--dry-run,-d: Dry run the update, no files will actually be modified.
Be sure to have a backup of your application before running these commands.
all- Run all upgrade commandstests- Update tests class names to FooTest rather than FooTestCaselocations- Move files and folders to their new homesi18n- Update the i18n translation method callshelpers- Update calls to helpersbasics- Update removed basics functions to PHP native functionsrequest- Update removed request access, and replace with $this->requestconfigure- Update Configure::read() to Configure::read('debug')constants- Replace obsolete constantscontroller_redirects- Return early on controller redirect callscomponents- Update components to extend Component classexceptions- Replace use of cakeError with exceptions
Licensed under The MIT License. See LICENSE file for details.