mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge pull request #5975 from silverstripe/pulls/4.0/clarify-upgrader-docs
Clarify upgrader docs
This commit is contained in:
commit
f5d71dc8ec
@ -60,12 +60,8 @@ as a standard first point of upgrade.
|
||||
|
||||
#### Upgrade references to renamed and namespaced classes
|
||||
|
||||
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:
|
||||
|
||||
Nearly all core PHP classes have been namespaced. For example, `DataObject` is now called `SilverStripe\ORM\DataObject`.
|
||||
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:
|
||||
|
||||
composer global require silverstripe/upgrader
|
||||
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
|
||||
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.
|
||||
This will resolve the majority of upgrading work, but we strongly recommend reviewing the diff
|
||||
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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user