diff --git a/docs/en/04_Changelogs/4.0.0.md b/docs/en/04_Changelogs/4.0.0.md index 807436e9d..4a652cca8 100644 --- a/docs/en/04_Changelogs/4.0.0.md +++ b/docs/en/04_Changelogs/4.0.0.md @@ -1283,6 +1283,12 @@ After (`mysite/_config/config.yml`): - `getModules` - `getConfigDirs` - `getConfigs` +* Removed `Session::set_config()` and `Session::get_config()`. Use the `Session.timeout` config setting instead +* Removed `Security::set_login_recording()` and `Security::get_login_recording()`. + Use the `Security.login_recording` config setting instead. +* Removed `ModelAsController::find_old_page()`. Use `OldPageRedirector::find_old_page()` instead +* Removed `RootURLController:set_default_homepage_link()` and `RootURLController::get_default_homepage_link()`. + Use the `RootURLController.default_homepage_link` config setting instead. * Removed `CreditCardField`, `CountryDropdownField`, `PhoneNumberField`, `MemberDatetimeOptionsetField`, `InlineFormAction`. Use custom code instead * Removed `ResetFormAction`, use `FormAction::create()->setAttribute('type', 'reset')` instead @@ -1321,7 +1327,8 @@ A very small number of methods were chosen for deprecation, and will be removed * `LimitWordCountXML` is removed. Use `LimitWordCount` instead. * `BigSummary` is removed. Use `Summary` instead. * Most limit methods on `DBHTMLText` now plain text rather than attempt to manipulate the underlying HTML. - * `FormField::Title` and `FormField::RightTitle` are now cast as plain text by default (but can be overridden). +* `FormField::Title` and `FormField::RightTitle` are now cast as plain text by default (but can be overridden). +* `FormField#createTag()` has been renamed to `FormField::create_tag()` * `Hierarchy` class has had much of it's functionality refactored out into `MarkedSet`: * `isMarked` * `isTreeOpened` @@ -1381,6 +1388,7 @@ A very small number of methods were chosen for deprecation, and will be removed * `DataObjectSchema` class added to assist with mapping between classes and tables. * `DBMoney` values are now treated as empty only if `Amount` field is null. If an `Amount` value is provided without a `Currency` specified, it will be formatted as per the current locale. +* Removed `DatabaseAdmin#clearAllData()`. Use `DB::get_conn()->clearAllData()` instead The below methods have been added or had their functionality updated to `DBDate`, `DBTime` and `DBDatetime` * `getTimestamp()` added to get the respective date / time as unix timestamp (seconds since 1970-01-01) diff --git a/src/Control/Director.php b/src/Control/Director.php index ac4ee9d03..19aa27e7b 100644 --- a/src/Control/Director.php +++ b/src/Control/Director.php @@ -575,17 +575,6 @@ class Director implements TemplateGlobalProvider } } - // Legacy ss4-alpha environment var - /** - * @todo remove at 4.0.0-beta1 - * @deprecated 4.0.0-beta1 - */ - $legacyHostname = getenv('SS_HOST'); - if ($legacyHostname) { - Deprecation::notice('4.0', 'SS_HOST will be removed in ss 4.0.0-beta1'); - return $legacyHostname; - } - // Fail over to server_name (least reliable) return isset($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : gethostname(); } 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'); - } } diff --git a/src/Forms/FormField.php b/src/Forms/FormField.php index 076fb0f52..93e2e7314 100644 --- a/src/Forms/FormField.php +++ b/src/Forms/FormField.php @@ -1260,22 +1260,6 @@ class FormField extends RequestHandler return strtolower(preg_replace('/Field$/', '', $type->getShortName())); } - /** - * @deprecated 4.0 Use FormField::create_tag() - * - * @param string $tag - * @param array $attributes - * @param null|string $content - * - * @return string - */ - public function createTag($tag, $attributes, $content = null) - { - Deprecation::notice('4.0', 'Use FormField::create_tag()'); - - return self::create_tag($tag, $attributes, $content); - } - /** * Abstract method each {@link FormField} subclass must implement, determines whether the field * is valid or not based on the value. diff --git a/src/ORM/DatabaseAdmin.php b/src/ORM/DatabaseAdmin.php index e81ef6250..5f63b1fef 100644 --- a/src/ORM/DatabaseAdmin.php +++ b/src/ORM/DatabaseAdmin.php @@ -361,17 +361,6 @@ class DatabaseAdmin extends Controller ClassInfo::reset_db_cache(); } - /** - * Clear all data out of the database - * - * @deprecated since version 4.0 - */ - public function clearAllData() - { - Deprecation::notice('4.0', 'Use DB::get_conn()->clearAllData() instead'); - DB::get_conn()->clearAllData(); - } - /** * Remove invalid records from tables - that is, records that don't have * corresponding records in their parent class tables. diff --git a/src/Security/Security.php b/src/Security/Security.php index 6c912010c..8cc9ac41e 100644 --- a/src/Security/Security.php +++ b/src/Security/Security.php @@ -1137,29 +1137,6 @@ class Security extends Controller implements TemplateGlobalProvider return true; } - /** - * Enable or disable recording of login attempts - * through the {@link LoginRecord} object. - * - * @deprecated 4.0 Use the "Security.login_recording" config setting instead - * @param boolean $bool - */ - public static function set_login_recording($bool) - { - Deprecation::notice('4.0', 'Use the "Security.login_recording" config setting instead'); - self::$login_recording = (bool)$bool; - } - - /** - * @deprecated 4.0 Use the "Security.login_recording" config setting instead - * @return boolean - */ - public static function login_recording() - { - Deprecation::notice('4.0', 'Use the "Security.login_recording" config setting instead'); - return self::$login_recording; - } - /** * @config * @var string Set the default login dest diff --git a/src/View/SSViewer.php b/src/View/SSViewer.php index 8ad0ee926..543bf0334 100644 --- a/src/View/SSViewer.php +++ b/src/View/SSViewer.php @@ -188,7 +188,7 @@ class SSViewer implements Flushable } /** - * @deprecated 4.0 Use the "SSViewer.theme" config setting instead + * @deprecated 4.0.0:5.0.0 Use the "SSViewer#set_themes" instead * @param string $theme The "base theme" name (without underscores). */ public static function set_theme($theme)