From 81e5c7ac4017fe5813e9eebb5edb5cc38a41dfa1 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Mon, 8 May 2017 21:07:16 +1200 Subject: [PATCH] API Removed deprecated Session::set_config() --- docs/en/04_Changelogs/4.0.0.md | 3 ++- src/Control/Session.php | 22 ---------------------- 2 files changed, 2 insertions(+), 23 deletions(-) diff --git a/docs/en/04_Changelogs/4.0.0.md b/docs/en/04_Changelogs/4.0.0.md index f1d7058e5..58770dcb6 100644 --- a/docs/en/04_Changelogs/4.0.0.md +++ b/docs/en/04_Changelogs/4.0.0.md @@ -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 #### 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` \ No newline at end of file + * `Authenticator` methods `register` and `unregister` are deprecated in favor of using `Config` diff --git a/src/Control/Session.php b/src/Control/Session.php index 0cabfcfe0..e502516f6 100644 --- a/src/Control/Session.php +++ b/src/Control/Session.php @@ -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'); - } }