From 05cf5a833b60238b7c17064e97ed1b3447a1203c Mon Sep 17 00:00:00 2001 From: Hamish Friedlander Date: Fri, 9 Mar 2012 17:51:08 +1300 Subject: [PATCH] MINOR: Dump deprecation notices introduced by the config system to 3.1.0 as it breaks heaps of code --- core/Object.php | 12 ++++++------ model/DataExtension.php | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/core/Object.php b/core/Object.php index 3ddfd07a8..1df17a82d 100755 --- a/core/Object.php +++ b/core/Object.php @@ -329,7 +329,7 @@ abstract class Object { * @return mixed */ public static function get_static($class, $name, $uncached = false) { - Deprecation::notice('3.0.0', 'combined_static is deprecated, replaced by Config#get'); + Deprecation::notice('3.1.0', 'combined_static is deprecated, replaced by Config#get'); return Config::inst()->get($class, $name, Config::FIRST_SET); } @@ -341,7 +341,7 @@ abstract class Object { * @param mixed $value */ public static function set_static($class, $name, $value) { - Deprecation::notice('3.0.0', 'set_static is deprecated, replaced by Config#set'); + Deprecation::notice('3.1.0', 'set_static is deprecated, replaced by Config#set'); Config::inst()->update($class, $name, $value); } @@ -358,7 +358,7 @@ abstract class Object { * @return mixed */ public static function uninherited_static($class, $name, $uncached = false) { - Deprecation::notice('3.0.0', 'uninherited_static is deprecated, replaced by Config#get'); + Deprecation::notice('3.1.0', 'uninherited_static is deprecated, replaced by Config#get'); return Config::inst()->get($class, $name, Config::UNINHERITED); } @@ -375,7 +375,7 @@ abstract class Object { public static function combined_static($class, $name, $ceiling = false) { if ($ceiling) throw new Exception('Ceiling argument to combined_static is no longer supported'); - Deprecation::notice('3.0.0', 'combined_static is deprecated, replaced by Config#get'); + Deprecation::notice('3.1.0', 'combined_static is deprecated, replaced by Config#get'); return Config::inst()->get($class, $name); } @@ -387,7 +387,7 @@ abstract class Object { * @param bool $replace replace existing static vars */ public static function addStaticVars($class, $properties, $replace = false) { - Deprecation::notice('3.0.0', 'addStaticVars is deprecated, replaced by Config#set'); + Deprecation::notice('3.1.0', 'addStaticVars is deprecated, replaced by Config#set'); foreach($properties as $prop => $value) self::add_static_var($class, $prop, $value, $replace); } @@ -408,7 +408,7 @@ abstract class Object { * @param bool $replace completely replace existing static values */ public static function add_static_var($class, $name, $value, $replace = false) { - Deprecation::notice('3.0.0', 'add_static_var is deprecated, replaced by Config#set'); + Deprecation::notice('3.1.0', 'add_static_var is deprecated, replaced by Config#set'); if ($replace) Config::inst()->remove($class, $name); Config::inst()->update($class, $name, $value); diff --git a/model/DataExtension.php b/model/DataExtension.php index 362d8a6f4..bd78c5ab7 100644 --- a/model/DataExtension.php +++ b/model/DataExtension.php @@ -42,7 +42,7 @@ abstract class DataExtension extends Extension { $statics = singleton($extensionClass)->$extraStaticsMethod($class, $extensionClass); if ($statics) { - Deprecation::notice('3.0.0', "$extraStaticsMethod deprecated. Just define statics on your extension, or use add_to_class"); + Deprecation::notice('3.1.0', "$extraStaticsMethod deprecated. Just define statics on your extension, or use add_to_class"); // TODO: This currently makes extraStatics the MOST IMPORTANT config layer, not the least foreach (self::$extendable_statics as $key => $merge) {