API Removed deprecated Session::set_config()

This commit is contained in:
Ingo Schommer 2017-05-08 21:07:16 +12:00 committed by Damian Mooyman
parent 1d438d3fb5
commit 81e5c7ac40
2 changed files with 2 additions and 23 deletions

View File

@ -1283,6 +1283,7 @@ After (`mysite/_config/config.yml`):
- `getModules`
- `getConfigDirs`
- `getConfigs`
* Removed `Session::set_config()` and `Session::get_config()`. Use the `Session.timeout` config setting instead
#### <a name="overview-general-deprecated"></a>General and Core Deprecated API
@ -1817,4 +1818,4 @@ New `TimeField` methods replace `getConfig()` / `setConfig()`
you will need to define this method and return a short name describing the login method.
* `MemberLoginForm` has a new constructor argument for the authenticator class, athough tis is usually
constructed by `MemberAuthenticator` and won't affect normal use.
* `Authenticator` methods `register` and `unregister` are deprecated in favor of using `Config`
* `Authenticator` methods `register` and `unregister` are deprecated in favor of using `Config`

View File

@ -544,26 +544,4 @@ class Session
{
self::current_session()->inst_destroy($removeCookie);
}
/**
* Set the timeout of a Session value
*
* @deprecated 4.0 Use the "Session.timeout" config setting instead
*
* @param int $timeout Time until a session expires in seconds. Defaults to expire when browser is closed.
*/
public static function set_timeout($timeout)
{
Deprecation::notice('4.0', 'Use the "Session.timeout" config setting instead');
Config::inst()->update('SilverStripe\\Control\\Session', 'timeout', (int) $timeout);
}
/**
* @deprecated 4.0 Use the "Session.timeout" config setting instead
*/
public static function get_timeout()
{
Deprecation::notice('4.0', 'Use the "Session.timeout" config setting instead');
return Config::inst()->get('SilverStripe\\Control\\Session', 'timeout');
}
}