Router::redirect() is deprecated. Use Router::scope() and RouteBuilder::redirect() instead.
The message gives some lead, but did not find direct answer in docs.
Direct switching to RouteBuilder::redirect() instead not possible as it is not static function.
Ok I found the problem in the end. Easy once you read
Router::scope()usage in docs properly and notice you getRouteBuilderobject as param for the function.Docs: https://book.cakephp.org/3/en/development/routing.html#quick-tour
Original (deprecated)
New