Skip to content

Commit 8304dce

Browse files
committed
Update docs.
1 parent 71fe2f4 commit 8304dce

1 file changed

Lines changed: 69 additions & 2 deletions

File tree

README.md

Lines changed: 69 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,19 @@
33
[![CI](https://github.com/cakephp/upgrade/actions/workflows/ci.yml/badge.svg)](https://github.com/cakephp/upgrade/actions/workflows/ci.yml)
44

55
Upgrade tools for CakePHP meant to facilitate migrating between CakePHP 4.x
6-
versions and from CakePHP 4.x to CakePHP 5.x. This repository should be used as a standalone
7-
application and *not* as a plugin.
6+
versions, from CakePHP 4.x to CakePHP 5.x, and between CakePHP 5.x versions.
7+
This repository should be used as a standalone application and *not* as a plugin.
8+
9+
## Table of Contents
10+
11+
- [Installation](#installation)
12+
- [Usage](#usage)
13+
- [Upgrading between CakePHP 4.x versions](#upgrading-between-cakephp-4x-versions)
14+
- [Upgrading from CakePHP 4.x to CakePHP 5.0](#upgrading-from-cakephp-4x-to-cakephp-50)
15+
- [Upgrading between CakePHP 5.x versions](#upgrading-between-cakephp-5x-versions)
16+
- [Additional Rulesets](#additional-rulesets)
17+
- [Upgrading from CakePHP 3.x to CakePHP 4.x](#upgrading-from-cakephp-3x-to-cakephp-4x)
18+
- [Development](#development)
819

920
## Installation
1021

@@ -43,10 +54,66 @@ bin/cake upgrade rector --rules cakephp44 /path/to/your/app/src
4354

4455
There are rules included for:
4556

57+
- cakephp40
4658
- cakephp41
4759
- cakephp42
4860
- cakephp43
4961
- cakephp44
62+
- cakephp45
63+
64+
## Upgrading from CakePHP 4.x to CakePHP 5.0
65+
66+
When upgrading from CakePHP 4.x to CakePHP 5.0, use the `cakephp50` ruleset to
67+
automate many of the required changes:
68+
69+
```bash
70+
cd /path/to/upgrade
71+
72+
# Apply upgrade rules from 4.x to 5.0
73+
bin/cake upgrade rector --rules cakephp50 /path/to/your/app/src
74+
bin/cake upgrade rector --rules cakephp50 /path/to/your/app/tests
75+
bin/cake upgrade rector --rules cakephp50 /path/to/your/app/config
76+
```
77+
78+
## Upgrading between CakePHP 5.x versions
79+
80+
When upgrading between CakePHP 5.x versions, use the appropriate ruleset for
81+
the target version:
82+
83+
```bash
84+
cd /path/to/upgrade
85+
86+
# To apply upgrade rules from 5.2 to 5.3
87+
bin/cake upgrade rector --rules cakephp53 /path/to/your/app/src
88+
```
89+
90+
There are rules included for:
91+
92+
- cakephp50
93+
- cakephp51
94+
- cakephp52
95+
- cakephp53
96+
97+
## Additional Rulesets
98+
99+
The upgrade tool also includes rulesets for related tools and libraries:
100+
101+
- **chronos3** - Upgrade to Chronos 3.x
102+
- **migrations45** - Upgrade to Migrations 4.5
103+
- **phpunit80** - Upgrade to PHPUnit 8.0
104+
105+
```bash
106+
cd /path/to/upgrade
107+
108+
# Apply Chronos 3 upgrade rules
109+
bin/cake upgrade rector --rules chronos3 /path/to/your/app/src
110+
111+
# Apply Migrations 4.5 upgrade rules
112+
bin/cake upgrade rector --rules migrations45 /path/to/your/app/config
113+
114+
# Apply PHPUnit 8.0 upgrade rules
115+
bin/cake upgrade rector --rules phpunit80 /path/to/your/app/tests
116+
```
50117

51118
## Upgrading from CakePHP 3.x to CakePHP 4.x
52119

0 commit comments

Comments
 (0)