Skip to content

Commit

Permalink
Added warnings for deprecated properties.
Browse files Browse the repository at this point in the history
  • Loading branch information
robertpustulka committed Nov 20, 2017
1 parent 0a964a4 commit b5693d1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Controller/Controller.php
Expand Up @@ -348,6 +348,7 @@ public function __get($name)
];
if (isset($deprecated[$name])) {
$method = $deprecated[$name];
deprecationWarning(sprintf('Controller::$%s is deprecated. Use $this->%s() instead.', $name, $method));

return $this->{$method}();
}
Expand Down Expand Up @@ -390,6 +391,7 @@ public function __set($name, $value)
];
if (isset($deprecated[$name])) {
$method = $deprecated[$name];
deprecationWarning(sprintf('Controller::$%s is deprecated. Use $this->%s() instead.', $name, $method));
$this->{$method}($value);

return;
Expand Down

0 comments on commit b5693d1

Please sign in to comment.