By dawehner on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
8.5.x
Introduced in version:
8.5.0-alpha1
Issue links:
Description:
As of 8.5.x the way how resource plugin methods (get(), post() and so on) are called is changed.
It used to pass along the parameters of the route path in the order defined there.
Now the argument resolver is used, which looks at the function signature itself, which means:
- You can get the request using
Request $request - You can get the route and the route match as well
- In case your resource had multiple parameters:
/example/{cat}/{dog}you could now swap them around in the function:
function get($dog, $cat); - If there is a default parameter value, it will not be overwritten. So
public function post(array $data = [])will need to be changed to:
public function post(array $data)
Impacts:
Module developers