mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
ENH Update deprecation messages
This commit is contained in:
parent
7b87926428
commit
2991901660
@ -145,7 +145,7 @@ class ClassLoader
|
|||||||
*/
|
*/
|
||||||
public function classExists($class)
|
public function classExists($class)
|
||||||
{
|
{
|
||||||
Deprecation::notice('4.0', 'Use ClassInfo::exists instead');
|
Deprecation::notice('4.0', 'Use ClassInfo::exists() instead');
|
||||||
return ClassInfo::exists($class);
|
return ClassInfo::exists($class);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -186,7 +186,7 @@ class FieldList extends ArrayList
|
|||||||
*/
|
*/
|
||||||
protected function collateDataFields(&$list, $saveableOnly = false)
|
protected function collateDataFields(&$list, $saveableOnly = false)
|
||||||
{
|
{
|
||||||
Deprecation::notice('5.0', 'Please use dataFields or SaveableFields');
|
Deprecation::notice('5.0', 'Please use dataFields() or SaveableFields()');
|
||||||
if (!isset($list)) {
|
if (!isset($list)) {
|
||||||
$list = [];
|
$list = [];
|
||||||
}
|
}
|
||||||
|
@ -1587,7 +1587,7 @@ class Form extends ViewableData implements HasRequestHandler
|
|||||||
* and _form_enctype. These are the attributes of the form. These fields
|
* and _form_enctype. These are the attributes of the form. These fields
|
||||||
* can be used to send the form to Ajax.
|
* can be used to send the form to Ajax.
|
||||||
*
|
*
|
||||||
* @deprecated 5.0
|
* @deprecated 5.0 Will be removed without equivalent functionality
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function formHtmlContent()
|
public function formHtmlContent()
|
||||||
|
@ -124,7 +124,7 @@ class TextField extends FormField implements TippableFieldInterface
|
|||||||
*/
|
*/
|
||||||
public function InternallyLabelledField()
|
public function InternallyLabelledField()
|
||||||
{
|
{
|
||||||
Deprecation::notice('4.0', 'Please use ->setValue() instead');
|
Deprecation::notice('4.0', 'Use setValue() instead');
|
||||||
|
|
||||||
if (!$this->value) {
|
if (!$this->value) {
|
||||||
$this->value = $this->Title();
|
$this->value = $this->Title();
|
||||||
|
@ -112,12 +112,12 @@ class DB
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @deprecated since version 4.0 Use DB::get_conn instead
|
* @deprecated Use DB::get_conn() instead
|
||||||
* @todo PSR-2 standardisation will probably un-deprecate this
|
* @todo PSR-2 standardisation will probably un-deprecate this
|
||||||
*/
|
*/
|
||||||
public static function getConn($name = 'default')
|
public static function getConn($name = 'default')
|
||||||
{
|
{
|
||||||
Deprecation::notice('4.0', 'Use DB::get_conn instead');
|
Deprecation::notice('4.0', 'Use DB::get_conn() instead');
|
||||||
return self::get_conn($name);
|
return self::get_conn($name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -376,7 +376,7 @@ class DatabaseAdmin extends Controller
|
|||||||
* @param string $fieldName The field name to look in for obsolete class names
|
* @param string $fieldName The field name to look in for obsolete class names
|
||||||
* @param string $oldClassName The old class name
|
* @param string $oldClassName The old class name
|
||||||
* @param string $newClassName The new class name
|
* @param string $newClassName The new class name
|
||||||
* @deprecated 5.0 use updateLegacyClassNameField instead
|
* @deprecated 5.0 use updateLegacyClassNameField() instead
|
||||||
*/
|
*/
|
||||||
protected function updateLegacyClassNames($dataClass, $fieldName, $oldClassName, $newClassName)
|
protected function updateLegacyClassNames($dataClass, $fieldName, $oldClassName, $newClassName)
|
||||||
{
|
{
|
||||||
|
@ -14,7 +14,7 @@ class RandomGenerator
|
|||||||
/**
|
/**
|
||||||
* @return string A 128-character, randomly generated ASCII string
|
* @return string A 128-character, randomly generated ASCII string
|
||||||
* @throws Exception If no suitable CSPRNG is installed
|
* @throws Exception If no suitable CSPRNG is installed
|
||||||
* @deprecated 4.4.0:5.0.0
|
* @deprecated 4.4.0:5.0.0 Use native php function random_bytes() instead
|
||||||
*/
|
*/
|
||||||
public function generateEntropy()
|
public function generateEntropy()
|
||||||
{
|
{
|
||||||
|
@ -464,7 +464,7 @@ class Security extends Controller implements TemplateGlobalProvider
|
|||||||
/**
|
/**
|
||||||
* Get the login forms for all available authentication methods
|
* Get the login forms for all available authentication methods
|
||||||
*
|
*
|
||||||
* @deprecated 5.0.0 Now handled by {@link static::delegateToMultipleHandlers}
|
* @deprecated 5.0.0 Use delegateToMultipleHandlers() instead
|
||||||
*
|
*
|
||||||
* @return array Returns an array of available login forms (array of Form
|
* @return array Returns an array of available login forms (array of Form
|
||||||
* objects).
|
* objects).
|
||||||
@ -1073,7 +1073,7 @@ class Security extends Controller implements TemplateGlobalProvider
|
|||||||
*
|
*
|
||||||
* @return Member
|
* @return Member
|
||||||
*
|
*
|
||||||
* @deprecated 4.0.0:5.0.0 Please use DefaultAdminService::findOrCreateDefaultAdmin()
|
* @deprecated 4.0.0:5.0.0 Use DefaultAdminService::findOrCreateDefaultAdmin()
|
||||||
*/
|
*/
|
||||||
public static function findAnAdministrator()
|
public static function findAnAdministrator()
|
||||||
{
|
{
|
||||||
@ -1086,7 +1086,7 @@ class Security extends Controller implements TemplateGlobalProvider
|
|||||||
/**
|
/**
|
||||||
* Flush the default admin credentials
|
* Flush the default admin credentials
|
||||||
*
|
*
|
||||||
* @deprecated 4.0.0:5.0.0 Please use DefaultAdminService::clearDefaultAdmin()
|
* @deprecated 4.0.0:5.0.0 Use DefaultAdminService::clearDefaultAdmin()
|
||||||
*/
|
*/
|
||||||
public static function clear_default_admin()
|
public static function clear_default_admin()
|
||||||
{
|
{
|
||||||
@ -1107,7 +1107,7 @@ class Security extends Controller implements TemplateGlobalProvider
|
|||||||
* @param string $password The password (in cleartext)
|
* @param string $password The password (in cleartext)
|
||||||
* @return bool True if successfully set
|
* @return bool True if successfully set
|
||||||
*
|
*
|
||||||
* @deprecated 4.0.0:5.0.0 Please use DefaultAdminService::setDefaultAdmin($username, $password)
|
* @deprecated 4.0.0:5.0.0 Use DefaultAdminService::setDefaultAdmin($username, $password)
|
||||||
*/
|
*/
|
||||||
public static function setDefaultAdmin($username, $password)
|
public static function setDefaultAdmin($username, $password)
|
||||||
{
|
{
|
||||||
|
@ -67,7 +67,7 @@ class SSViewer_BasicIteratorSupport implements TemplateIteratorProvider
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @deprecated 5.0.0 Use IsFirst() to avoid clashes with SS_Lists
|
* @deprecated 5.0.0 Use IsFirst() instead
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function First()
|
public function First()
|
||||||
@ -87,7 +87,7 @@ class SSViewer_BasicIteratorSupport implements TemplateIteratorProvider
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @deprecated 5.0.0 Use IsLast() to avoid clashes with SS_Lists
|
* @deprecated 5.0.0 Use IsLast() instead
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function Last()
|
public function Last()
|
||||||
|
Loading…
Reference in New Issue
Block a user