Skip to content

Commit

Permalink
Update existing User deprecation warnings for the ViewBuilder
Browse files Browse the repository at this point in the history
  • Loading branch information
antograssiot committed Jan 13, 2017
1 parent ec7f590 commit 067e32e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions src/Controller/Controller.php
Expand Up @@ -335,7 +335,7 @@ public function __get($name)
if (in_array($name, ['layout', 'view', 'theme', 'autoLayout', 'viewPath', 'layoutPath'], true)) {
$method = $name === 'viewPath' ? 'templatePath' : $name;
trigger_error(
sprintf('Controller::$%s is deprecated. Use $this->viewBuilder()->%s() instead.', $name, $method),
sprintf('Controller::$%s is deprecated. Use $this->viewBuilder()->set%s()/$this->viewBuilder()->get%s() instead.', $name, ucfirst($method)),
E_USER_DEPRECATED
);

Expand Down Expand Up @@ -371,9 +371,9 @@ public function __set($name, $value)
$method = $deprecated[$name];
trigger_error(
sprintf(
'Controller::$%s is deprecated. Use $this->viewBuilder()->%s() instead.',
'Controller::$%s is deprecated. Use $this->viewBuilder()->set%s()/$this->viewBuilder()->get%s() instead.',
$name,
$method
ucfirst($method)
),
E_USER_DEPRECATED
);
Expand Down
10 changes: 5 additions & 5 deletions src/Http/ServerRequest.php
Expand Up @@ -111,7 +111,7 @@ class ServerRequest implements ArrayAccess, ServerRequestInterface
* The full address to the current request
*
* @var string
* @deprecated 3.4.0 This public property will be removed in 4.0.0. Use here() instead.
* @deprecated 3.4.0 This public property will be removed in 4.0.0. Use getRequestTarget() instead.
*/
public $here;

Expand Down Expand Up @@ -2074,7 +2074,7 @@ public function getRequestTarget()
*
* @param string $name Name of the key being accessed.
* @return mixed
* @deprecated 3.4.0 The ArrayAccess methods will be removed in 4.0.0. Use param(), data() and query() instead.
* @deprecated 3.4.0 The ArrayAccess methods will be removed in 4.0.0. Use getParam(), getData() and getQuery() instead.
*/
public function offsetGet($name)
{
Expand All @@ -2097,7 +2097,7 @@ public function offsetGet($name)
* @param string $name Name of the key being written
* @param mixed $value The value being written.
* @return void
* @deprecated 3.4.0 The ArrayAccess methods will be removed in 4.0.0. Use param(), data() and query() instead.
* @deprecated 3.4.0 The ArrayAccess methods will be removed in 4.0.0. Use setParam(), setData() and setQuery() instead.
*/
public function offsetSet($name, $value)
{
Expand All @@ -2109,7 +2109,7 @@ public function offsetSet($name, $value)
*
* @param string $name thing to check.
* @return bool
* @deprecated 3.4.0 The ArrayAccess methods will be removed in 4.0.0. Use param(), data() and query() instead.
* @deprecated 3.4.0 The ArrayAccess methods will be removed in 4.0.0. Use getParam(), getData() and getQuery() instead.
*/
public function offsetExists($name)
{
Expand All @@ -2125,7 +2125,7 @@ public function offsetExists($name)
*
* @param string $name Name to unset.
* @return void
* @deprecated 3.4.0 The ArrayAccess methods will be removed in 4.0.0. Use param(), data() and query() instead.
* @deprecated 3.4.0 The ArrayAccess methods will be removed in 4.0.0. Use setParam(), setData() and setQuery() instead.
*/
public function offsetUnset($name)
{
Expand Down
2 changes: 1 addition & 1 deletion src/View/ViewVarsTrait.php
Expand Up @@ -28,7 +28,7 @@ trait ViewVarsTrait
* The name of default View class.
*
* @var string
* @deprecated 3.1.0 Use `$this->viewBuilder()->className()` instead.
* @deprecated 3.1.0 Use `$this->viewBuilder()->getClassName()`/`$this->viewBuilder()->setClassName()` instead.
*/
public $viewClass = null;

Expand Down

0 comments on commit 067e32e

Please sign in to comment.