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

v1.0.1 2025-10-08 22:19 UTC

This package is auto-updated.

Last update: 2025-10-09 00:22:46 UTC


README

GitHub License Packagist Version PHP CakePHP CI Codecov

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 commands
  • tests - Update tests class names to FooTest rather than FooTestCase
  • locations - Move files and folders to their new homes
  • i18n - Update the i18n translation method calls
  • helpers - Update calls to helpers
  • basics - Update removed basics functions to PHP native functions
  • request - Update removed request access, and replace with $this->request
  • configure - Update Configure::read() to Configure::read('debug')
  • constants - Replace obsolete constants
  • controller_redirects - Return early on controller redirect calls
  • components - Update components to extend Component class
  • exceptions - Replace use of cakeError with exceptions

License

Licensed under The MIT License. See LICENSE file for details.