You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have middleware where I transform all keys to snake case, and I always to used for that simple code
if (!$request->isMethod('GET')) {
$data = $request->request->all();
$files = $request->files->all();
if (ArrayKeyTransformer::hasSnake($data) || ArrayKeyTransformer::hasSnake($files)) {
throw ResourceNotValid::withErrors(
[ApiErrorResponse::REQUEST_ERROR_KEY => 'Snake case request keys not allowed']
);
}
$request->request->replace(ArrayKeyTransformer::toSnake($data));
$request->files->replace(ArrayKeyTransformer::toSnake($files));
}
As can You see I try to transform $request->all() where I expected to get all body parameters. My middleware working greate before 10.16.1. Now, when I try to get parameters with metod $request->all() I always recived parameters from field
JSON->parameters not from request where I transformed keys.
Laravel Version
10.16.1
PHP Version
8.2
Database Driver & Version
No response
Description
Hello,
when I dumping my request - dd($request) I found new field here:
I have middleware where I transform all keys to snake case, and I always to used for that simple code
As can You see I try to transform $request->all() where I expected to get all body parameters. My middleware working greate before 10.16.1. Now, when I try to get parameters with metod $request->all() I always recived parameters from field
JSON->parameters not from request where I transformed keys.
I wonder this field -> JSON will stay with us or its simple mistake :)
Thanks
Gabriel
Steps To Reproduce
I used dd($request) in controller to see result of new state of request
The text was updated successfully, but these errors were encountered: