pieceofcake2 / upgrade
Upgrade plugin for CakePHP 2.x - Legacy upgrade tool
Installs: 0
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
Type:cakephp-plugin
pkg:composer/pieceofcake2/upgrade
Requires
- php: >=8.0
- composer/installers: *
- pieceofcake2/cakephp: ^2.11
Requires (Dev)
- cakephp/cakephp-codesniffer: ^5.0
- phpstan/phpstan: ^2.1
- phpunit/phpunit: ^9.6
- pieceofcake2/app: ^2.2
- pieceofcake2/phpstan-cakephp2: ^0.2.1
README
This plugin provides the UpgradeShell
to help automate upgrading applications from CakePHP 1.3 to 2.0.
Installation
Using Composer
Install the plugin using Composer:
composer require --dev pieceofcake2/upgrade
Usage
Load 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
Options
--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.
Important
Be sure to have a backup of your application before running these commands.
Available Upgrade 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
License
Licensed under The MIT License. See LICENSE file for details.