Skip to content

Commit

Permalink
Merge pull request #743 from cakephp/3.x-deprecations
Browse files Browse the repository at this point in the history
Remove deprecations.
  • Loading branch information
markstory authored Mar 10, 2020
2 parents f2ed910 + d80c44a commit fbe68d1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Panel/RequestPanel.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public function shutdown(Event $event)
{
/* @var \Cake\Controller\Controller $controller */
$controller = $event->getSubject();
$request = $controller->request;
$request = $controller->getRequest();
$this->_data = [
'params' => $request->getAttribute("params"),
'query' => $request->getQueryParams(),
Expand Down
4 changes: 2 additions & 2 deletions src/Panel/RoutesPanel.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ public function summary()
*/
public function shutdown(Event $event)
{
/* @var \Cake\Controller\Controller|null $controller */
$controller = $event->getSubject();
/* @var \Cake\Http\ServerRequest $request */
$request = $controller ? $controller->request : null;
$request = $controller ? $controller->getRequest() : null;
$this->_data = [
'matchedRoute' => $request ? $request->getParam('_matchedRoute') : null,
];
Expand Down
3 changes: 2 additions & 1 deletion src/Panel/VariablesPanel.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ protected function _walkDebugInfo(callable $walker, $item)
*/
public function shutdown(Event $event)
{
/* @var \Cake\Controller\Controller $controller */
$controller = $event->getSubject();
$errors = [];

Expand Down Expand Up @@ -145,7 +146,7 @@ public function shutdown(Event $event)
if ($v instanceof EntityInterface) {
$errors[$k] = $this->_getErrors($v);
} elseif ($v instanceof Form) {
$formError = $v->errors();
$formError = $v->getErrors();
if (!empty($formError)) {
$errors[$k] = $formError;
}
Expand Down

0 comments on commit fbe68d1

Please sign in to comment.