diff --git a/docs/en/changelogs/3.1.0.md b/docs/en/changelogs/3.1.0.md index c1402bd90..9dc4482ad 100644 --- a/docs/en/changelogs/3.1.0.md +++ b/docs/en/changelogs/3.1.0.md @@ -40,9 +40,8 @@ The configuration system added in SilverStripe 3.0 builds on this by using this of defining the default value. In SilverStripe 3.0, it was possible to edit this value at run-time and have the change propagate into the -configuration system. This is no longer the case, for performance reasons. If you change a static value -through direct assignment, then the configuration system will silently ignore it. -Reading a static value directly will give you stale data. +configuration system. This is no longer the case, for performance reasons. We've marked all "configurable" +statics as `private`, so you can't set or retrieve their value directly. When using static setters or getters, the system throws a deprecation warning. Notable exceptions to this rule are all static setters which accept objects, such as `SS_Cache::add_backend()`. @@ -60,12 +59,12 @@ Here's an example on how to rewrite a common `_config.php` configuration: global $database; $database = 'SS_mydb'; - + require_once('conf/ConfigureFromEnv.php'); SSViewer::set_theme('simple'); - + if(class_exists('SiteTree')) SiteTree::enable_nested_urls(); - + if(Director::isLive()) Email::setAdminEmail('support@mydomain.com'); if(is_defined('MY_REDIRECT_EMAILS')) Email::send_all_emails_to('developer@mydomain.com'); @@ -76,7 +75,7 @@ Here's an example on how to rewrite a common `_config.php` configuration: SSViewer::set_theme('basic'); } - The ugpraded `_config.php`: +The ugpraded `_config.php`: :::php update('SSViewer'. 'theme', 'basic'); } - The upgraded `config.yml`: +The upgraded `config.yml`: :::yml --- @@ -122,6 +121,11 @@ Some examples of changed notations (not exhaustive, there's over a hundred in to * `Director::setBaseURL`: Use `Director.alternate_base_url` instead * `SSViewer::setOption('rewriteHashlinks', ...)`: Use `SSViewer.rewrite_hashlinks` instead +**Important**: Please remember to upgrade the installer project as well, particularly +your `.htaccess` or `web.config` files. Web access to these sensitive YAML configuration files +needs to be explicitly denied through these configuration files (see the [3.0.5 security release](/changelogs/3.0.4)) +for details. + For more information about how to use the config system, see the ["Configuration" topic](/topic/configuration). ### default_cast is now Text