Upgrading to new patch versions of the recipe shouldn't take a long time. See recipes documentation to learn more about how recipe versioning is structured.
To get the newest patch release of the recipe, just run:
This will update the recipe to the new version, and pull in all the new dependencies. A new
composer.lock file will be generated. Once you are satisfied the site is running as expected, commit both files:
git commit composer.* -m "Upgrade the recipe to latest patch release"
After you have pushed this commit back to your remote repository you can deploy the change.
Minor and major upgrades
Assuming your project is using one of the supported recipes, these will likely take more time as the APIs may change between minor and major releases. For small sites it's possible for minor upgrade to take a day of work, and major upgrades could take several days. Of course this can widely differ depending on each project.
To upgrade your code, open the root
composer.json file. Find the lines that reference the recipes, like
silverstripe/recipe-cms and change the referenced versions to what has been reference in the changelog (as well as any other modules that have a new version).
For example, assuming that you are currently on version
~5.0.0@stable, if you wish to upgrade to 5.1.0 you will need to modify your
composer.json file to explicitly specify the new release branch, here
You now need to pull in new dependencies and commit the lock file:
git commit composer.* -m "Upgrade to recipe 5.1.0"
Push this commit to your remote repository, and continue with your deployment workflow.
Cherrypicking the upgrades
If you like to only upgrade the recipe modules, you can cherry pick what is upgraded using this syntax:
composer update silverstripe/recipe-cms
This will update only the specified metapackage module without touching anything else. You still need to commit resulting