Upgrading notes on mysite/_config.php

This commit is contained in:
Damian Mooyman 2017-06-22 11:49:19 +12:00
parent 6279d28e5e
commit 738f50c497
No known key found for this signature in database
GPG Key ID: 78B823A10DE27D1A
1 changed files with 15 additions and 1 deletions

View File

@ -111,6 +111,16 @@ the `SilverStripe\Forms` namespace.
The below sections deal with upgrades to specific parts of various API. Projects which rely on certain
API should be upgraded as appropriate using any of the relevant processes documented below.
#### Upgrade `mysite/_config.php`
The globals `$database` and `$databaseConfig` are deprecated. You should upgrade your
site _config.php files to use the `.env` configuration (below).
If you need to configure database details in PHP, use the new `DB::setConfig()` api instead.
You should remove any references to `ConfigureFromEnv.php` in your project, as this file
is no longer necessary.
#### Upgrade of `_ss_environment.php` to `.env` configuration
The php configuration `_ss_environment.php` file has been replaced in favour of a non-executable
@ -160,6 +170,9 @@ logic early in the bootstrap, this is best placed in the `_config.php` files.
Note also that `$_FILE_TO_URL_MAPPING` has been removed and replaced with `SS_BASE_URL` env var.
The global values `$database` and `$databaseConfig` have been deprecated, as has `ConfigureFromEnv.php`
which is no longer necessary.
See [Environment Management docs](/getting-started/environment_management/) for full details.
#### Replace usages of Object class
@ -1367,6 +1380,7 @@ After (`mysite/_config/config.yml`):
#### <a name="overview-general-removed"></a>General and Core Removed API
* Removed `ConfigureFromEnv.php` as it's no longer necessary.
* `Session` object has had significant refactoring. This object no longer is accessed via
Session::inst(), but instead should be queried from the current request via `$request->getSession()`.
All static methods have been removed, and the `inst_` prefix removed from all instance members.
@ -1463,7 +1477,6 @@ A very small number of methods were chosen for deprecation, and will be removed
#### <a name="overview-orm-api"></a>ORM API Additions / Changes
* Deprecated globals `$database` and `$databaseConfig`. Please use `DB::setConfig()` instead.
* Deprecate `SQLQuery` in favour `SQLSelect`
* `DataObject.many_many` 'through' relationships now support join dataobjects in place of
automatically generated join tables. See the [/developer_guides/relations](datamodel relationship docs)
@ -1587,6 +1600,7 @@ The below methods have been added or had their functionality updated to `DBDate`
#### <a name="overview-orm-removed"></a>ORM Removed API
* Deprecated globals `$database` and `$databaseConfig`. Please use `DB::setConfig()` instead.
* `DataModel` removed
* `DataObject::can*` methods no longer accept a member ID. These must now be passed a Member object or left null
* `DataObject::db` removed and replaced with `DataObjectSchema::fieldSpec` and `DataObjectSchema::fieldSpecs`