mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Increased recent deprecation warnings from 3.1 to 3.2
The deprecations are supposed to denote the release where the functionality will be removed, as opposed to the one where its deprecated. Having 3.1 as a target for recent changes in popular methods like Object::add_extension() causes too many short-term hassles, there's no "grace period".
This commit is contained in:
parent
2debbd37dc
commit
06ff9f72b1
@ -585,7 +585,7 @@ class RestfulService_Response extends SS_HTTPResponse {
|
||||
* @param string
|
||||
*/
|
||||
public function setCachedBody($content) {
|
||||
Deprecation::notice('3.1', 'Setting the response body is now deprecated, set the cached request instead');
|
||||
Deprecation::notice('3.2', 'Setting the response body is now deprecated, set the cached request instead');
|
||||
if (!$this->cachedResponse) {
|
||||
$this->cachedResponse = new RestfulService_Response($content);
|
||||
}
|
||||
|
@ -424,7 +424,7 @@ abstract class Object {
|
||||
$class = get_called_class();
|
||||
|
||||
if(func_num_args() > 1) {
|
||||
Deprecation::notice('3.1.0', "Object::has_extension() deprecated. Call has_extension() on the class");
|
||||
Deprecation::notice('3.2.0', "Object::has_extension() deprecated. Call has_extension() on the class");
|
||||
$class = func_get_arg(0);
|
||||
$requiredExtension = func_get_arg(1);
|
||||
}
|
||||
@ -457,7 +457,7 @@ abstract class Object {
|
||||
$class = get_called_class();
|
||||
|
||||
if(func_num_args() > 1) {
|
||||
Deprecation::notice('3.1.0', "Object::add_extension() deprecated. Call add_extension() on the class");
|
||||
Deprecation::notice('3.2.0', "Object::add_extension() deprecated. Call add_extension() on the class");
|
||||
$class = func_get_arg(0);
|
||||
$extension = func_get_arg(1);
|
||||
}
|
||||
@ -518,7 +518,7 @@ abstract class Object {
|
||||
$class = get_called_class();
|
||||
|
||||
if(func_num_args() > 1) {
|
||||
Deprecation::notice('3.1.0', "Object::remove_extension() deprecated. Call remove_extension() on the class");
|
||||
Deprecation::notice('3.2.0', "Object::remove_extension() deprecated. Call remove_extension() on the class");
|
||||
$class = func_get_arg(0);
|
||||
$extension = func_get_arg(1);
|
||||
}
|
||||
@ -584,7 +584,7 @@ abstract class Object {
|
||||
$sources[] = $extensionClass;
|
||||
|
||||
if(!ClassInfo::has_method_from($extensionClass, 'add_to_class', 'Extension')) {
|
||||
Deprecation::notice('3.1.0',
|
||||
Deprecation::notice('3.2.0',
|
||||
"add_to_class deprecated on $extensionClass. Use get_extra_config instead");
|
||||
}
|
||||
|
||||
|
@ -755,8 +755,11 @@ class FormField extends RequestHandler {
|
||||
return strtolower(preg_replace('/Field$/', '', $this->class));
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated 3.2 Use FormField::create_tag()
|
||||
*/
|
||||
public function createTag($tag, $attributes, $content = null) {
|
||||
Deprecation::notice('3.1', 'Use FormField::create_tag()');
|
||||
Deprecation::notice('3.2', 'Use FormField::create_tag()');
|
||||
return self::create_tag($tag, $attributes, $content);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user