From 27ce71390af17d03986a8e35d7037d14a3e1ba58 Mon Sep 17 00:00:00 2001 From: Damian Mooyman Date: Mon, 20 Jun 2016 12:07:29 +1200 Subject: [PATCH] Documentation for https://github.com/silverstripe/silverstripe-upgrader/ (#5695) --- docs/en/04_Changelogs/4.0.0.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/docs/en/04_Changelogs/4.0.0.md b/docs/en/04_Changelogs/4.0.0.md index 3bf1a0cb2..bd434254e 100644 --- a/docs/en/04_Changelogs/4.0.0.md +++ b/docs/en/04_Changelogs/4.0.0.md @@ -302,6 +302,26 @@ E.g. ## Upgrading +### Automatically upgrading + +4.0 moves many classes to namespaces, and renames many methods. +A tool is available to (semi-)automatically update your 3.x code to the new 4.0 names. + +See https://github.com/silverstripe/silverstripe-upgrader/ for the latest documentation on +how to upgrade your code. Typically the process will be: + + + composer global require silverstripe/upgrader + cd ~/Project/Root + ~/.composer/vendor/bin/upgrade-code upgrade ./mysite --write + + +If you want to do a dry-run, omit the `--write` option to see a preview of a diff of +all changed project files. + +This will resolve the majority of upgrading work, but for specific changes that will +require manual intervention, please see the below upgrading notes. + ### Update code that uses SQLQuery Where your code once used SQLQuery you should now use SQLSelect in all cases, as this has been removed.