Permalink
Browse files

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".
  • Loading branch information...
1 parent 2debbd3 commit 06ff9f72b161c1040f28217965a444ae014cea3c @chillu chillu committed Mar 20, 2013
Showing with 9 additions and 6 deletions.
  1. +1 −1 api/RestfulService.php
  2. +4 −4 core/Object.php
  3. +4 −1 forms/FormField.php
View
2 api/RestfulService.php
@@ -585,7 +585,7 @@ public function getCachedBody() {
* @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);
}
View
8 core/Object.php
@@ -424,7 +424,7 @@ public static function has_extension($requiredExtension) {
$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 @@ public static function add_extension($extension) {
$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 @@ public static function remove_extension($extension) {
$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 @@ static public function get_extra_config_sources($class = null) {
$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");
}
View
5 forms/FormField.php
@@ -755,8 +755,11 @@ public function Type() {
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);
}

0 comments on commit 06ff9f7

Please sign in to comment.