PHPackages                             cakephp/upgrade - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. cakephp/upgrade

ActiveRector-extension[Framework](/categories/framework)

cakephp/upgrade
===============

Command line tool for updating CakePHP applications and plugins.

6.x-dev(4d ago)1113.3k↓50.9%59MITPHPPHP ^8.2CI passing

Since Jul 7Pushed 4d ago22 watchersCompare

[ Source](https://github.com/cakephp/upgrade)[ Packagist](https://packagist.org/packages/cakephp/upgrade)[ Docs](https://cakephp.org)[ RSS](/packages/cakephp-upgrade/feed)WikiDiscussions 5.x Synced 2d ago

READMEChangelogDependencies (6)Versions (10)Used By (0)

CakePHP Upgrade tool
====================

[](#cakephp-upgrade-tool)

[![CI](https://github.com/cakephp/upgrade/actions/workflows/ci.yml/badge.svg)](https://github.com/cakephp/upgrade/actions/workflows/ci.yml)[![Minimum PHP Version](https://camo.githubusercontent.com/ec21f169d70b69344c67d6f18fa1a24d20476d2f0cd680e8c4a1534c22f34e5f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344253230382e322d3838393242462e737667)](https://php.net/)[![License](https://camo.githubusercontent.com/c0d1084b6d407fe17fa2dc5019558e99cd5264ccd0347dabf0d0b33f160496b9/68747470733a2f2f706f7365722e707567782e6f72672f63616b657068702f757067726164652f6c6963656e73652e737667)](LICENSE)

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

Table of Contents
-----------------

[](#table-of-contents)

- [Installation](#installation)
- [Usage](#usage)
- [Upgrading between CakePHP 4.x versions](#upgrading-between-cakephp-4x-versions)
- [Upgrading from CakePHP 4.x to CakePHP 5.0](#upgrading-from-cakephp-4x-to-cakephp-50)
- [Upgrading between CakePHP 5.x versions](#upgrading-between-cakephp-5x-versions)
- [Additional Rulesets](#additional-rulesets)
- [Upgrading from CakePHP 3.x to CakePHP 4.x](#upgrading-from-cakephp-3x-to-cakephp-4x)
- [Development](#development)

Installation
------------

[](#installation)

First clone this repository or download a zipball:

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

Then to install dependencies with `composer`

```
php composer.phar install --no-dev
```

Usage
-----

[](#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.

Note: Don't point the tool directly to your ROOT, as this will most likely cause memory fails. Instead, always point it to the respective sub-directories, e.g. `src`, `tests` and `config`.

Upgrading between CakePHP 4.x versions
--------------------------------------

[](#upgrading-between-cakephp-4x-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.

```
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:

- cakephp40
- cakephp41
- cakephp42
- cakephp43
- cakephp44
- cakephp45

Upgrading from CakePHP 4.x to CakePHP 5.0
-----------------------------------------

[](#upgrading-from-cakephp-4x-to-cakephp-50)

When upgrading from CakePHP 4.x to CakePHP 5.0, use the `cakephp50` ruleset to automate many of the required changes:

```
cd /path/to/upgrade

# Apply upgrade rules from 4.x to 5.0
bin/cake upgrade rector --rules cakephp50 /path/to/your/app/src
bin/cake upgrade rector --rules cakephp50 /path/to/your/app/tests
bin/cake upgrade rector --rules cakephp50 /path/to/your/app/config
```

Upgrading between CakePHP 5.x versions
--------------------------------------

[](#upgrading-between-cakephp-5x-versions)

When upgrading between CakePHP 5.x versions, use the appropriate ruleset for the target version:

```
cd /path/to/upgrade

# To apply upgrade rules from 5.2 to 5.3
bin/cake upgrade rector --rules cakephp53 /path/to/your/app/src
```

There are rules included for:

- cakephp50
- cakephp51
- cakephp52
- cakephp53

Additional Rulesets
-------------------

[](#additional-rulesets)

The upgrade tool also includes rulesets for related tools and libraries:

- **chronos3** - Upgrade to Chronos 3.x
- **migrations45** - Upgrade to Migrations 4.5
- **migrations50** - Upgrade to Migrations 5.0
- **phpunit80** - Upgrade to PHPUnit 8.0

```
cd /path/to/upgrade

# Apply Chronos 3 upgrade rules
bin/cake upgrade rector --rules chronos3 /path/to/your/app/src

# Apply Migrations 4.5 upgrade rules
bin/cake upgrade rector --rules migrations45 /path/to/your/app/config

# Apply Migrations 5.0 upgrade rules
bin/cake upgrade rector --rules migrations50 /path/to/your/app/config

# Apply PHPUnit 8.0 upgrade rules
bin/cake upgrade rector --rules phpunit80 /path/to/your/app/tests
```

Upgrading from CakePHP 3.x to CakePHP 4.x
-----------------------------------------

[](#upgrading-from-cakephp-3x-to-cakephp-4x)

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.

Once you have installed the upgrade tool dependencies there are several commands you should run:

```
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
-----------

[](#development)

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

To install dev-dependencies use `composer setup`. Then you will be able to run `composer test` and `composer cs-check` etc.

See also `Makefile` for more shortcut commands.

###  Health Score

56

—

FairBetter than 97% of packages

Maintenance99

Actively maintained with recent releases

Popularity40

Moderate usage in the ecosystem

Community31

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor3

3 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~363 days

Total

4

Last Release

4d ago

Major Versions

3.x-dev → 4.x-dev2024-05-06

4.x-dev → 5.x-dev2026-06-30

5.x-dev → 6.x-dev2026-06-30

PHP version history (2 changes)4.x-devPHP ^8.0

5.x-devPHP ^8.2

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/23666?v=4)[CakePHP](/maintainers/cakephp)[@cakephp](https://github.com/cakephp)

---

Top Contributors

[![markstory](https://avatars.githubusercontent.com/u/24086?v=4)](https://github.com/markstory "markstory (152 commits)")[![LordSimal](https://avatars.githubusercontent.com/u/9105243?v=4)](https://github.com/LordSimal "LordSimal (70 commits)")[![othercorey](https://avatars.githubusercontent.com/u/24221186?v=4)](https://github.com/othercorey "othercorey (61 commits)")[![samsonasik](https://avatars.githubusercontent.com/u/459648?v=4)](https://github.com/samsonasik "samsonasik (50 commits)")[![dereuromark](https://avatars.githubusercontent.com/u/39854?v=4)](https://github.com/dereuromark "dereuromark (42 commits)")[![AD7six](https://avatars.githubusercontent.com/u/33387?v=4)](https://github.com/AD7six "AD7six (23 commits)")[![ADmad](https://avatars.githubusercontent.com/u/142658?v=4)](https://github.com/ADmad "ADmad (20 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (18 commits)")[![lorenzo](https://avatars.githubusercontent.com/u/37621?v=4)](https://github.com/lorenzo "lorenzo (9 commits)")[![ceeram](https://avatars.githubusercontent.com/u/111448?v=4)](https://github.com/ceeram "ceeram (8 commits)")[![devcorrelator](https://avatars.githubusercontent.com/u/13592517?v=4)](https://github.com/devcorrelator "devcorrelator (8 commits)")[![bcrowe](https://avatars.githubusercontent.com/u/752603?v=4)](https://github.com/bcrowe "bcrowe (8 commits)")[![garas](https://avatars.githubusercontent.com/u/2265694?v=4)](https://github.com/garas "garas (6 commits)")[![geoffoliver](https://avatars.githubusercontent.com/u/680706?v=4)](https://github.com/geoffoliver "geoffoliver (4 commits)")[![softius](https://avatars.githubusercontent.com/u/586121?v=4)](https://github.com/softius "softius (3 commits)")[![antograssiot](https://avatars.githubusercontent.com/u/4977112?v=4)](https://github.com/antograssiot "antograssiot (3 commits)")[![hmic](https://avatars.githubusercontent.com/u/876917?v=4)](https://github.com/hmic "hmic (2 commits)")[![renan](https://avatars.githubusercontent.com/u/28046?v=4)](https://github.com/renan "renan (2 commits)")[![carusogabriel](https://avatars.githubusercontent.com/u/16328050?v=4)](https://github.com/carusogabriel "carusogabriel (2 commits)")[![Arhell](https://avatars.githubusercontent.com/u/26163841?v=4)](https://github.com/Arhell "Arhell (2 commits)")

### Embed Badge

![Health badge](/badges/cakephp-upgrade/health.svg)

```
[![Health](https://phpackages.com/badges/cakephp-upgrade/health.svg)](https://phpackages.com/packages/cakephp-upgrade)
```

###  Alternatives

[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k15](/packages/tempest-framework)[pimcore/pimcore

Content &amp; Product Management Framework (CMS/PIM/E-Commerce)

3.8k3.8M508](/packages/pimcore-pimcore)[shopware/platform

The Shopware e-commerce core

3.4k1.5M3](/packages/shopware-platform)[drupal/core-recommended

Locked core dependencies; require this project INSTEAD OF drupal/core.

6942.5M421](/packages/drupal-core-recommended)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.4M203](/packages/sulu-sulu)[ssch/typo3-rector

Instant fixes for your TYPO3 PHP code by using Rector.

2603.2M436](/packages/ssch-typo3-rector)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
