Clarify upgrader docs

This commit is contained in:
Ingo Schommer 2016-09-09 13:54:54 +12:00 committed by GitHub
parent 484b6f6c62
commit 01fdb7949f

View File

@ -60,12 +60,8 @@ as a standard first point of upgrade.
#### Upgrade references to renamed and namespaced classes #### Upgrade references to renamed and namespaced classes
4.0 moves many classes to namespaces, and renames many methods. Nearly all core PHP classes have been namespaced. For example, `DataObject` is now called `SilverStripe\ORM\DataObject`.
A tool is available to (semi-)automatically update your 3.x code to the new 4.0 names. We have developed an [upgrader tool](https://github.com/silverstripe/silverstripe-upgrader/) to (semi-)automatically update your 3.x code to the new naming. Here's an example how to upgrade your `mysite` folder:
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 composer global require silverstripe/upgrader
cd ~/Project/Root cd ~/Project/Root
@ -75,8 +71,12 @@ how to upgrade your code. Typically the process will be:
If you want to do a dry-run, omit the `--write` option to see a preview of a diff of If you want to do a dry-run, omit the `--write` option to see a preview of a diff of
all changed project files. all changed project files.
This will resolve the majority of upgrading work, but for specific changes that will This will resolve the majority of upgrading work, but we strongly recommend reviewing the diff
require manual intervention, please see the below upgrading notes. running some regression testing on your functionality. SilverStripe core classes can be referenced
in your PHP files, but also in YAML configuration and SilverStripe templates.
For a full list of renamed classes, check the `.upgrade.yml` definitions in each module.
The rename won't affect class-based permission codes or database table names.
#### Upgrade template locations and references #### Upgrade template locations and references