From 9ed5925dbc604ddd0f4b61aa1c3bd9a23bf9d0ff Mon Sep 17 00:00:00 2001 From: Mark Story Date: Wed, 24 Aug 2016 23:36:20 -0400 Subject: [PATCH] Deprecate public properties that have accessor methods. This is only the beginning of the public property deprecations. More properties will be deprecated as new accessor methods are introduced. Refs #9325 --- src/Network/Request.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/Network/Request.php b/src/Network/Request.php index fbd5b10159a..66ec9b821f7 100644 --- a/src/Network/Request.php +++ b/src/Network/Request.php @@ -23,10 +23,6 @@ /** * A class that helps wrap Request information and particulars about a single request. * Provides methods commonly used to introspect on the request headers and request body. - * - * Has both an Array and Object interface. You can access framework parameters using indexes: - * - * `$request['controller']` or `$request->controller`. */ class Request implements ArrayAccess { @@ -35,6 +31,7 @@ class Request implements ArrayAccess * Array of parameters parsed from the URL. * * @var array + * @deprecated 3.4.0 This public property will be removed in 4.0.0. Use param() instead. */ public $params = [ 'plugin' => null, @@ -50,6 +47,7 @@ class Request implements ArrayAccess * data. * * @var array + * @deprecated 3.4.0 This public property will be removed in 4.0.0. Use data() instead. */ public $data = []; @@ -57,6 +55,7 @@ class Request implements ArrayAccess * Array of querystring arguments * * @var array + * @deprecated 3.4.0 This public property will be removed in 4.0.0. Use query() instead. */ public $query = []; @@ -64,6 +63,7 @@ class Request implements ArrayAccess * Array of cookie data. * * @var array + * @deprecated 3.4.0 This public property will be removed in 4.0.0. Use cookie() instead. */ public $cookies = []; @@ -597,6 +597,8 @@ public function __call($name, $params) * * @param string $name The property being accessed. * @return mixed Either the value of the parameter or null. + * @deprecated 3.4.0 Accessing routing parameters through __get will removed in 4.0.0. + * Use param() instead. */ public function __get($name) { @@ -613,6 +615,8 @@ public function __get($name) * * @param string $name The property being accessed. * @return bool Existence + * @deprecated 3.4.0 Accessing routing parameters through __isset will removed in 4.0.0. + * Use param() instead. */ public function __isset($name) {