Skip to content

Commit b09dc72

Browse files
author
euromark
committed
deprecate Controller::flash() and adjust some other deprecation messages.
1 parent 64b6940 commit b09dc72

File tree

7 files changed

+18
-17
lines changed

7 files changed

+18
-17
lines changed

lib/Cake/Controller/Component/AclComponent.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ public function inherit($aro, $aco, $action = "*") {
156156
* @param array|string|Model $aco ACO The controlled object identifier. See `AclNode::node()` for possible formats
157157
* @param string $action Action (defaults to *)
158158
* @return boolean Success
159-
* @deprecated
159+
* @deprecated Will be removed in 3.0.
160160
*/
161161
public function grant($aro, $aco, $action = "*") {
162162
trigger_error(__d('cake_dev', 'AclComponent::grant() is deprecated, use allow() instead'), E_USER_WARNING);
@@ -170,7 +170,7 @@ public function grant($aro, $aco, $action = "*") {
170170
* @param array|string|Model $aco ACO The controlled object identifier. See `AclNode::node()` for possible formats
171171
* @param string $action Action (defaults to *)
172172
* @return boolean Success
173-
* @deprecated
173+
* @deprecated Will be removed in 3.0.
174174
*/
175175
public function revoke($aro, $aco, $action = "*") {
176176
trigger_error(__d('cake_dev', 'AclComponent::revoke() is deprecated, use deny() instead'), E_USER_WARNING);

lib/Cake/Controller/Controller.php

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -705,7 +705,7 @@ public function shutdownProcess() {
705705
*
706706
* @return array Associative array of the HTTP codes as keys, and the message
707707
* strings as values, or null of the given $code does not exist.
708-
* @deprecated Use CakeResponse::httpCodes();
708+
* @deprecated Since 2.4. Will be removed in 3.0. Use CakeResponse::httpCodes().
709709
*/
710710
public function httpCodes($code = null) {
711711
return $this->response->httpCodes($code);
@@ -820,7 +820,7 @@ protected function _parseBeforeRedirect($response, $url, $status, $exit) {
820820
*
821821
* @param string $status The header message that is being set.
822822
* @return void
823-
* @deprecated Use CakeResponse::header()
823+
* @deprecated Will be removed in 3.0. Use CakeResponse::header().
824824
*/
825825
public function header($status) {
826826
$this->response->header($status);
@@ -978,7 +978,7 @@ public function referer($default = null, $local = false) {
978978
*
979979
* @return void
980980
* @link http://book.cakephp.org/2.0/en/controllers.html#Controller::disableCache
981-
* @deprecated Use CakeResponse::disableCache()
981+
* @deprecated Will be removed in 3.0. Use CakeResponse::disableCache().
982982
*/
983983
public function disableCache() {
984984
$this->response->disableCache();
@@ -995,6 +995,7 @@ public function disableCache() {
995995
* @param string $layout Layout you want to use, defaults to 'flash'
996996
* @return void
997997
* @link http://book.cakephp.org/2.0/en/controllers.html#Controller::flash
998+
* @deprecated Will be removed in 3.0. Use Session::setFlash().
998999
*/
9991000
public function flash($message, $url, $pause = 1, $layout = 'flash') {
10001001
$this->autoRender = false;
@@ -1015,7 +1016,7 @@ public function flash($message, $url, $pause = 1, $layout = 'flash') {
10151016
* @param boolean $exclusive If true, and $op is an array, fields not included in $op will not be
10161017
* included in the returned conditions
10171018
* @return array An array of model conditions
1018-
* @deprecated Will be removed in 3.0
1019+
* @deprecated Will be removed in 3.0.
10191020
*/
10201021
public function postConditions($data = array(), $op = null, $bool = 'AND', $exclusive = false) {
10211022
if (!is_array($data) || empty($data)) {
@@ -1072,7 +1073,7 @@ public function postConditions($data = array(), $op = null, $bool = 'AND', $excl
10721073
* @param array $whitelist List of allowed options for paging
10731074
* @return array Model query results
10741075
* @link http://book.cakephp.org/2.0/en/controllers.html#Controller::paginate
1075-
* @deprecated Use PaginatorComponent instead
1076+
* @deprecated Will be removed in 3.0. Use PaginatorComponent instead.
10761077
*/
10771078
public function paginate($object = null, $scope = array(), $whitelist = array()) {
10781079
return $this->Components->load('Paginator', $this->paginate)->paginate($object, $scope, $whitelist);
@@ -1146,7 +1147,7 @@ public function beforeScaffold($method) {
11461147
* @param string $method
11471148
* @return boolean
11481149
* @see Controller::beforeScaffold()
1149-
* @deprecated
1150+
* @deprecated Will be removed in 3.0.
11501151
*/
11511152
protected function _beforeScaffold($method) {
11521153
return $this->beforeScaffold($method);
@@ -1169,7 +1170,7 @@ public function afterScaffoldSave($method) {
11691170
* @param string $method
11701171
* @return boolean
11711172
* @see Controller::afterScaffoldSave()
1172-
* @deprecated
1173+
* @deprecated Will be removed in 3.0.
11731174
*/
11741175
protected function _afterScaffoldSave($method) {
11751176
return $this->afterScaffoldSave($method);
@@ -1192,7 +1193,7 @@ public function afterScaffoldSaveError($method) {
11921193
* @param string $method
11931194
* @return boolean
11941195
* @see Controller::afterScaffoldSaveError()
1195-
* @deprecated
1196+
* @deprecated Will be removed in 3.0.
11961197
*/
11971198
protected function _afterScaffoldSaveError($method) {
11981199
return $this->afterScaffoldSaveError($method);
@@ -1217,7 +1218,7 @@ public function scaffoldError($method) {
12171218
* @param string $method
12181219
* @return boolean
12191220
* @see Controller::scaffoldError()
1220-
* @deprecated
1221+
* @deprecated Will be removed in 3.0.
12211222
*/
12221223
protected function _scaffoldError($method) {
12231224
return $this->scaffoldError($method);

lib/Cake/Model/BehaviorCollection.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public function init($modelName, $behaviors = array()) {
7676
* @param string $behavior
7777
* @param array $config
7878
* @return void
79-
* @deprecated Replaced with load()
79+
* @deprecated Will be removed in 3.0. Replaced with load().
8080
*/
8181
public function attach($behavior, $config = array()) {
8282
return $this->load($behavior, $config);
@@ -206,7 +206,7 @@ public function unload($name) {
206206
*
207207
* @param string $name Name of behavior
208208
* @return void
209-
* @deprecated Use unload instead.
209+
* @deprecated Will be removed in 3.0. Use unload instead.
210210
*/
211211
public function detach($name) {
212212
return $this->unload($name);

lib/Cake/Utility/Debugger.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ public static function log($var, $level = LOG_DEBUG) {
203203
* @param integer $line Line that triggered the error
204204
* @param array $context Context
205205
* @return boolean true if error was handled
206-
* @deprecated This function is superseded by Debugger::outputError()
206+
* @deprecated Will be removed in 3.0. This function is superseded by Debugger::outputError().
207207
*/
208208
public static function showError($code, $description, $file = null, $line = null, $context = null) {
209209
$self = Debugger::getInstance();

lib/Cake/Utility/ObjectCollection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ public function enabled($name = null) {
272272
* returns an array of currently-attached objects
273273
* @return mixed If $name is specified, returns the boolean status of the corresponding object.
274274
* Otherwise, returns an array of all attached objects.
275-
* @deprecated Use loaded instead.
275+
* @deprecated Will be removed in 3.0. Use loaded instead.
276276
*/
277277
public function attached($name = null) {
278278
return $this->loaded($name);

lib/Cake/Utility/Security.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ public static function setCost($cost) {
180180
* @param string $text Encrypted string to decrypt, normal string to encrypt
181181
* @param string $key Key to use
182182
* @return string Encrypted/Decrypted string
183-
* @deprecated This method will be removed in 3.x
183+
* @deprecated Will be removed in 3.0.
184184
*/
185185
public static function cipher($text, $key) {
186186
if (empty($key)) {

lib/Cake/basics.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ function env($key) {
391391
* @param mixed $expires A valid strtotime string when the data expires.
392392
* @param string $target The target of the cached data; either 'cache' or 'public'.
393393
* @return mixed The contents of the temporary file.
394-
* @deprecated Please use Cache::write() instead
394+
* @deprecated Will be removed in 3.0. Please use Cache::write() instead.
395395
*/
396396
function cache($path, $data = null, $expires = '+1 day', $target = 'cache') {
397397
if (Configure::read('Cache.disable')) {

0 commit comments

Comments
 (0)