mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
3.1 changelog improvements
This commit is contained in:
parent
3334eafcb1
commit
c8f26e673a
@ -40,9 +40,8 @@ The configuration system added in SilverStripe 3.0 builds on this by using this
|
|||||||
of defining the default value.
|
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
|
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
|
configuration system. This is no longer the case, for performance reasons. We've marked all "configurable"
|
||||||
through direct assignment, then the configuration system will silently ignore it.
|
statics as `private`, so you can't set or retrieve their value directly.
|
||||||
Reading a static value directly will give you stale data.
|
|
||||||
When using static setters or getters, the system throws a deprecation warning.
|
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()`.
|
Notable exceptions to this rule are all static setters which accept objects, such as `SS_Cache::add_backend()`.
|
||||||
|
|
||||||
@ -76,7 +75,7 @@ Here's an example on how to rewrite a common `_config.php` configuration:
|
|||||||
SSViewer::set_theme('basic');
|
SSViewer::set_theme('basic');
|
||||||
}
|
}
|
||||||
|
|
||||||
The ugpraded `_config.php`:
|
The ugpraded `_config.php`:
|
||||||
|
|
||||||
:::php
|
:::php
|
||||||
<?php
|
<?php
|
||||||
@ -98,7 +97,7 @@ Here's an example on how to rewrite a common `_config.php` configuration:
|
|||||||
Config::inst()->update('SSViewer'. 'theme', 'basic');
|
Config::inst()->update('SSViewer'. 'theme', 'basic');
|
||||||
}
|
}
|
||||||
|
|
||||||
The upgraded `config.yml`:
|
The upgraded `config.yml`:
|
||||||
|
|
||||||
:::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
|
* `Director::setBaseURL`: Use `Director.alternate_base_url` instead
|
||||||
* `SSViewer::setOption('rewriteHashlinks', ...)`: Use `SSViewer.rewrite_hashlinks` 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).
|
For more information about how to use the config system, see the ["Configuration" topic](/topic/configuration).
|
||||||
|
|
||||||
### default_cast is now Text
|
### default_cast is now Text
|
||||||
|
Loading…
x
Reference in New Issue
Block a user