Home

Awesome

CakePHP Upgrade tool

CI Minimum PHP Version PHPStan Software License

Upgrade tool as standalone application for CakePHP meant to facilitate migrating

Warning This tool is still under development and doesn't handle all aspects of migrating.


CakePHP 5

The brand new upgrade command of this tool provides a configurable approach. Define sets/levels and run it over your app or plugin:

bin/cake upgrade files /path/to/repo -v -d

Keep verbose and dry-run for checking if it works as expected, then apply your changes for real.

This tool works best in combination with the official upgrade tool and its rector based approaches.

If rector fails or cannot handle your app, you can try to use this tool completely by defining more regex based rules for example.

You can check active vs available tasks using --help together with -v. It will list all available ones, active ones are in green.

For docs on this check here.


Installation

This plugin is standalone. Do not try to mix this with your existing app. Instead, put it somewhere completely separate from it. Best to clone it (git clone ....).

After downloading/cloning the upgrade tool, you need to install dependencies with composer

composer install

Once dependencies are installed you can start using the upgrade shell.

Note: If you want to get the latest master, you can run composer update at your own risk. It will download also all recent changes done. Alternatively, you can lock it down to a stable version and then update.

IMPORTANT NOTICE

This tool is an add-on to original CakePHP upgrade tool and provides additional fixers:

The FileUpgrade tool also:

Feel free to manually port those things back into the core one.

Usage

Upgrade command

Important upgrade steps:

bin/cake upgrade /home/mark/Sites/my-app

Upgrade files

See above bin/cake upgrade files docs.

Upgrade legacy shell

See cake4 branch.