From b09dc7213a500e376d83a1b872c40b5f898305fb Mon Sep 17 00:00:00 2001 From: euromark Date: Mon, 12 Aug 2013 12:51:12 +0200 Subject: [PATCH] deprecate Controller::flash() and adjust some other deprecation messages. --- .../Controller/Component/AclComponent.php | 4 ++-- lib/Cake/Controller/Controller.php | 19 ++++++++++--------- lib/Cake/Model/BehaviorCollection.php | 4 ++-- lib/Cake/Utility/Debugger.php | 2 +- lib/Cake/Utility/ObjectCollection.php | 2 +- lib/Cake/Utility/Security.php | 2 +- lib/Cake/basics.php | 2 +- 7 files changed, 18 insertions(+), 17 deletions(-) diff --git a/lib/Cake/Controller/Component/AclComponent.php b/lib/Cake/Controller/Component/AclComponent.php index c15b0ad16..dbb8975a1 100644 --- a/lib/Cake/Controller/Component/AclComponent.php +++ b/lib/Cake/Controller/Component/AclComponent.php @@ -156,7 +156,7 @@ class AclComponent extends Component { * @param array|string|Model $aco ACO The controlled object identifier. See `AclNode::node()` for possible formats * @param string $action Action (defaults to *) * @return boolean Success - * @deprecated + * @deprecated Will be removed in 3.0. */ public function grant($aro, $aco, $action = "*") { trigger_error(__d('cake_dev', 'AclComponent::grant() is deprecated, use allow() instead'), E_USER_WARNING); @@ -170,7 +170,7 @@ class AclComponent extends Component { * @param array|string|Model $aco ACO The controlled object identifier. See `AclNode::node()` for possible formats * @param string $action Action (defaults to *) * @return boolean Success - * @deprecated + * @deprecated Will be removed in 3.0. */ public function revoke($aro, $aco, $action = "*") { trigger_error(__d('cake_dev', 'AclComponent::revoke() is deprecated, use deny() instead'), E_USER_WARNING); diff --git a/lib/Cake/Controller/Controller.php b/lib/Cake/Controller/Controller.php index edf05e425..daf2cf2cc 100644 --- a/lib/Cake/Controller/Controller.php +++ b/lib/Cake/Controller/Controller.php @@ -705,7 +705,7 @@ class Controller extends Object implements CakeEventListener { * * @return array Associative array of the HTTP codes as keys, and the message * strings as values, or null of the given $code does not exist. - * @deprecated Use CakeResponse::httpCodes(); + * @deprecated Since 2.4. Will be removed in 3.0. Use CakeResponse::httpCodes(). */ public function httpCodes($code = null) { return $this->response->httpCodes($code); @@ -820,7 +820,7 @@ class Controller extends Object implements CakeEventListener { * * @param string $status The header message that is being set. * @return void - * @deprecated Use CakeResponse::header() + * @deprecated Will be removed in 3.0. Use CakeResponse::header(). */ public function header($status) { $this->response->header($status); @@ -978,7 +978,7 @@ class Controller extends Object implements CakeEventListener { * * @return void * @link http://book.cakephp.org/2.0/en/controllers.html#Controller::disableCache - * @deprecated Use CakeResponse::disableCache() + * @deprecated Will be removed in 3.0. Use CakeResponse::disableCache(). */ public function disableCache() { $this->response->disableCache(); @@ -995,6 +995,7 @@ class Controller extends Object implements CakeEventListener { * @param string $layout Layout you want to use, defaults to 'flash' * @return void * @link http://book.cakephp.org/2.0/en/controllers.html#Controller::flash + * @deprecated Will be removed in 3.0. Use Session::setFlash(). */ public function flash($message, $url, $pause = 1, $layout = 'flash') { $this->autoRender = false; @@ -1015,7 +1016,7 @@ class Controller extends Object implements CakeEventListener { * @param boolean $exclusive If true, and $op is an array, fields not included in $op will not be * included in the returned conditions * @return array An array of model conditions - * @deprecated Will be removed in 3.0 + * @deprecated Will be removed in 3.0. */ public function postConditions($data = array(), $op = null, $bool = 'AND', $exclusive = false) { if (!is_array($data) || empty($data)) { @@ -1072,7 +1073,7 @@ class Controller extends Object implements CakeEventListener { * @param array $whitelist List of allowed options for paging * @return array Model query results * @link http://book.cakephp.org/2.0/en/controllers.html#Controller::paginate - * @deprecated Use PaginatorComponent instead + * @deprecated Will be removed in 3.0. Use PaginatorComponent instead. */ public function paginate($object = null, $scope = array(), $whitelist = array()) { return $this->Components->load('Paginator', $this->paginate)->paginate($object, $scope, $whitelist); @@ -1146,7 +1147,7 @@ class Controller extends Object implements CakeEventListener { * @param string $method * @return boolean * @see Controller::beforeScaffold() - * @deprecated + * @deprecated Will be removed in 3.0. */ protected function _beforeScaffold($method) { return $this->beforeScaffold($method); @@ -1169,7 +1170,7 @@ class Controller extends Object implements CakeEventListener { * @param string $method * @return boolean * @see Controller::afterScaffoldSave() - * @deprecated + * @deprecated Will be removed in 3.0. */ protected function _afterScaffoldSave($method) { return $this->afterScaffoldSave($method); @@ -1192,7 +1193,7 @@ class Controller extends Object implements CakeEventListener { * @param string $method * @return boolean * @see Controller::afterScaffoldSaveError() - * @deprecated + * @deprecated Will be removed in 3.0. */ protected function _afterScaffoldSaveError($method) { return $this->afterScaffoldSaveError($method); @@ -1217,7 +1218,7 @@ class Controller extends Object implements CakeEventListener { * @param string $method * @return boolean * @see Controller::scaffoldError() - * @deprecated + * @deprecated Will be removed in 3.0. */ protected function _scaffoldError($method) { return $this->scaffoldError($method); diff --git a/lib/Cake/Model/BehaviorCollection.php b/lib/Cake/Model/BehaviorCollection.php index ab812d9d9..45ed2b324 100644 --- a/lib/Cake/Model/BehaviorCollection.php +++ b/lib/Cake/Model/BehaviorCollection.php @@ -76,7 +76,7 @@ class BehaviorCollection extends ObjectCollection implements CakeEventListener { * @param string $behavior * @param array $config * @return void - * @deprecated Replaced with load() + * @deprecated Will be removed in 3.0. Replaced with load(). */ public function attach($behavior, $config = array()) { return $this->load($behavior, $config); @@ -206,7 +206,7 @@ class BehaviorCollection extends ObjectCollection implements CakeEventListener { * * @param string $name Name of behavior * @return void - * @deprecated Use unload instead. + * @deprecated Will be removed in 3.0. Use unload instead. */ public function detach($name) { return $this->unload($name); diff --git a/lib/Cake/Utility/Debugger.php b/lib/Cake/Utility/Debugger.php index c004bdbd1..7818e8bdd 100644 --- a/lib/Cake/Utility/Debugger.php +++ b/lib/Cake/Utility/Debugger.php @@ -203,7 +203,7 @@ class Debugger { * @param integer $line Line that triggered the error * @param array $context Context * @return boolean true if error was handled - * @deprecated This function is superseded by Debugger::outputError() + * @deprecated Will be removed in 3.0. This function is superseded by Debugger::outputError(). */ public static function showError($code, $description, $file = null, $line = null, $context = null) { $self = Debugger::getInstance(); diff --git a/lib/Cake/Utility/ObjectCollection.php b/lib/Cake/Utility/ObjectCollection.php index f91977b99..f832fbae6 100644 --- a/lib/Cake/Utility/ObjectCollection.php +++ b/lib/Cake/Utility/ObjectCollection.php @@ -272,7 +272,7 @@ abstract class ObjectCollection { * returns an array of currently-attached objects * @return mixed If $name is specified, returns the boolean status of the corresponding object. * Otherwise, returns an array of all attached objects. - * @deprecated Use loaded instead. + * @deprecated Will be removed in 3.0. Use loaded instead. */ public function attached($name = null) { return $this->loaded($name); diff --git a/lib/Cake/Utility/Security.php b/lib/Cake/Utility/Security.php index a3b162207..d237f12e0 100644 --- a/lib/Cake/Utility/Security.php +++ b/lib/Cake/Utility/Security.php @@ -180,7 +180,7 @@ class Security { * @param string $text Encrypted string to decrypt, normal string to encrypt * @param string $key Key to use * @return string Encrypted/Decrypted string - * @deprecated This method will be removed in 3.x + * @deprecated Will be removed in 3.0. */ public static function cipher($text, $key) { if (empty($key)) { diff --git a/lib/Cake/basics.php b/lib/Cake/basics.php index 567977205..04c1a19c1 100644 --- a/lib/Cake/basics.php +++ b/lib/Cake/basics.php @@ -391,7 +391,7 @@ if (!function_exists('cache')) { * @param mixed $expires A valid strtotime string when the data expires. * @param string $target The target of the cached data; either 'cache' or 'public'. * @return mixed The contents of the temporary file. - * @deprecated Please use Cache::write() instead + * @deprecated Will be removed in 3.0. Please use Cache::write() instead. */ function cache($path, $data = null, $expires = '+1 day', $target = 'cache') { if (Configure::read('Cache.disable')) {