A. Create branch¶
Create a new branch for handling update changes from the branch you're updating on:
1 | |
This creates a new project branch (update-{{ target_version }}) for the update based on your current project branch.
B. Add upstream remote¶
If it's not added as a remote yet, add an upstream remote:
1 | |
1 | |
1 | |
C. Prepare for pulling changes¶
Adding sort-packages option when updating from <=v1.13.4, v2.2.3, v2.3.2
Composer sorts packages listed in composer.json.
If your packages aren't sorted yet, you should prepare for this update to make it clearer which changes you introduce.
Assuming you have installed packages on your installation (composer install), do the following steps:
1. Add sort-packages to the config section in composer.json.
1 2 3 4 5 6 7 | |
2. Use composer require to get Composer to sort your packages.
The following example updates a few requirements with what you can expect in the upcoming change:
1 2 3 4 | |
3. Check that you can install/update packages.
1 | |
If Composer says there were no updates, or if it updates packages without stopping with conflicts, your preparation was successful.
4. Save your work.
1 | |
D. Pull the tag into your branch¶
Pull the latest v{{ target_version }} tag into the update-{{ target_version }} branch with the following command:
1 | |
At this stage you may get conflicts, which are a normal part of the update procedure.