diff --git a/phpstan.neon b/phpstan.neon index b075e4e59..2391a09b3 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -10,7 +10,7 @@ parameters: - '#Call to an undefined method Crud\\Action\\BaseAction::view\(\)#' - '#Call to an undefined method Crud\\Action\\BaseAction::viewVar\(\)#' - '#Call to an undefined method Crud\\Action\\BaseAction::findMethod\(\)#' - - '#Call to an undefined method Cake\\ORM\\BehaviorRegistry::filterParams\(\)# ' + - '#Call to an undefined method Cake\\ORM\\Table::filterParams\(\)# ' - '#Call to an undefined method object::getLogs\(\)#' - '#Access to an undefined property object::\$url#' - '#Access to an undefined property object::\$success#' diff --git a/src/Listener/SearchListener.php b/src/Listener/SearchListener.php index cf0153fb7..f230e29f7 100644 --- a/src/Listener/SearchListener.php +++ b/src/Listener/SearchListener.php @@ -56,7 +56,7 @@ public function injectSearch(Event $event) } if ($repository instanceof Table && $repository->behaviors()->hasMethod('filterParams')) { - $filterParams = $repository->behaviors()->filterParams($this->_request()->getQuery()); + $filterParams = $repository->filterParams($this->_request()->getQuery()); } else { $filterParams = ['search' => $this->_request()->getQuery()]; }