2017 © Pedro Peláez
 

project upgrade

CakePHP upgrade tool

image

cakephp/upgrade

CakePHP upgrade tool

  • Monday, December 11, 2017
  • by cakephp
  • Repository
  • 31 Watchers
  • 74 Stars
  • 697 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 40 Forks
  • 10 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

CakePHP Upgrade tool

CI, (*1)

Upgrade tools for CakePHP meant to facilitate migrating between CakePHP 4.x versions and from CakePHP 4.x to CakePHP 5.x. This repository should be used as a standalone application and not as a plugin., (*2)

Installation

First clone this repository or download a zipball:, (*3)

git clone git://github.com/cakephp/upgrade

Then to install dependencies with composer, (*4)

php composer.phar install --no-dev

Usage

The upgrade tool provides a standalone application that can be used to upgrade other applications or cakephp plugins. Each of the subcommands accepts a path that points to the application you want to upgrade., (*5)

Upgrading between CakePHP 4.x versions

When upgrading between CakePHP 4.x versions the rector command can automate updates for many deprecation warnings. To get the most value from the rector command you should be sure to add as many typehints or parameter docblock annotations as you can. Without these annotations or typehints rector will not be able to be as effective as it cannot infer types., (*6)

cd /path/to/upgrade

# To apply upgrade rules from 4.3 to 4.4
bin/cake upgrade rector --rules cakephp44 /path/to/your/app/src

There are rules included for:, (*7)

  • cakephp41
  • cakephp42
  • cakephp43
  • cakephp44

Upgrading from CakePHP 3.x to CakePHP 4.x

The upgrade tool is intended to be run before you update your application's dependencies to 4.0. The rector based tasks will not run correctly if your application already has its dependencies updated to 4.x., (*8)

Once you have installed the upgrade tool dependencies there are several commands you should run:, (*9)

cd /path/to/upgrade

# Run all upgrade tasks at once.
bin/cake upgrade /home/mark/Sites/my-app

# OR run upgrade tasks individually.
# Rename locale files
bin/cake upgrade file_rename locales /home/mark/Sites/my-app

# Rename template files
bin/cake upgrade file_rename templates /home/mark/Sites/my-app

# Run rector rules.
bin/cake upgrade rector /home/mark/Sites/my-app/src
bin/cake upgrade rector /home/mark/Sites/my-app/tests
bin/cake upgrade rector /home/mark/Sites/my-app/config

Development

To ease installation & usage, this package does not use require-dev in composer.json as the installed PHPUnit and CakePHP packages cause conflicts with the rector tasks., (*10)

To install dev-dependencies use make install-dev. Then you will be able to run vendor/bin/phpunit. You can also use make test to install dependencies and run tests., (*11)

The Versions

11/12 2017

dev-dereuromark-patch-1

dev-dereuromark-patch-1 http://cakephp.org

CakePHP upgrade tool

  Sources   Download

MIT

The Requires

 

05/01 2015

dev-master-fixtures

dev-master-fixtures http://cakephp.org

CakePHP upgrade tool

  Sources   Download

MIT

The Requires

 

27/12 2014

dev-master-template

dev-master-template http://cakephp.org

CakePHP upgrade tool

  Sources   Download

MIT

The Requires