-
Notifications
You must be signed in to change notification settings - Fork 11.4k
[4.2] Correctly fill the $request->request parameter bag on creation #7052
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Can you describe the bug? |
Also a test would be nice. Thanks :) |
The bug is described in the description. I'll add a test later today. |
* @return \Illuminate\Http\Request | ||
*/ | ||
public static function createFromBase(SymfonyRequest $request) | ||
public static function createFromBase(SymfonyRequest $base) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please do not rename this variable.
Updated. |
Can you describe how this actually effects applications? What could you not do before that this fixes? |
In our case: we pass on the SymfonyRequest object to the OAuth2 server from The PHP League with this method. It then uses the There are several people and issues with the request to support |
[4.2] Correctly fill the $request->request parameter bag on creation
The
Illuminate\Http\Request
class extends theSymfony\Component\HttpFoundation\Request
. But the SymfonyRequest does not fill the property->request
(which should hold the POST parameters), except when theContent-Type
header is equal toapplication/x-www-form-urlencoded
(see source).IlluminateRequest
parses the request body if theContent-Type
header is set toapplication/json
, but only when thegetInputSource()
method is called. In Laravel you can request theIlluminateRequest
and pass it on, but when theIlluminateRequest
is used using theSymfonyRequest
interface, and they access the->request
ParameterBag
, it will not be loaded with the request body data if it's json formatted.