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:
Ingo Schommer 2013-03-20 10:00:51 +01:00
parent 2debbd37dc
commit 06ff9f72b1
3 changed files with 9 additions and 6 deletions

View File

@ -585,7 +585,7 @@ class RestfulService_Response extends SS_HTTPResponse {
* @param string * @param string
*/ */
public function setCachedBody($content) { 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) { if (!$this->cachedResponse) {
$this->cachedResponse = new RestfulService_Response($content); $this->cachedResponse = new RestfulService_Response($content);
} }

View File

@ -424,7 +424,7 @@ abstract class Object {
$class = get_called_class(); $class = get_called_class();
if(func_num_args() > 1) { 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); $class = func_get_arg(0);
$requiredExtension = func_get_arg(1); $requiredExtension = func_get_arg(1);
} }
@ -457,7 +457,7 @@ abstract class Object {
$class = get_called_class(); $class = get_called_class();
if(func_num_args() > 1) { 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); $class = func_get_arg(0);
$extension = func_get_arg(1); $extension = func_get_arg(1);
} }
@ -518,7 +518,7 @@ abstract class Object {
$class = get_called_class(); $class = get_called_class();
if(func_num_args() > 1) { 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); $class = func_get_arg(0);
$extension = func_get_arg(1); $extension = func_get_arg(1);
} }
@ -584,7 +584,7 @@ abstract class Object {
$sources[] = $extensionClass; $sources[] = $extensionClass;
if(!ClassInfo::has_method_from($extensionClass, 'add_to_class', 'Extension')) { 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"); "add_to_class deprecated on $extensionClass. Use get_extra_config instead");
} }

View File

@ -755,8 +755,11 @@ class FormField extends RequestHandler {
return strtolower(preg_replace('/Field$/', '', $this->class)); return strtolower(preg_replace('/Field$/', '', $this->class));
} }
/**
* @deprecated 3.2 Use FormField::create_tag()
*/
public function createTag($tag, $attributes, $content = null) { 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); return self::create_tag($tag, $attributes, $content);
} }