This commit is contained in:
Damian Mooyman 2016-06-20 12:07:29 +12:00 committed by Sam Minnée
parent 9998f4b5c8
commit 27ce71390a

View File

@ -302,6 +302,26 @@ E.g.
## Upgrading ## 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 ### Update code that uses SQLQuery
Where your code once used SQLQuery you should now use SQLSelect in all cases, as this has been removed. Where your code once used SQLQuery you should now use SQLSelect in all cases, as this has been removed.