-
-
Notifications
You must be signed in to change notification settings - Fork 57
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
Leverage Request::getPayload()
to populate the parsed body of PSR-7 requests
#117
Leverage Request::getPayload()
to populate the parsed body of PSR-7 requests
#117
Conversation
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.
Thank you for your PR.
First of all "it works"/"it doesn't work" does not tell me what exactly "it" is that you want to be working. Please adjust the PR description, so the reader knows what exactly the feature is that you'd like to deliver here.
Secondly, we don't merge new features without any tests. That's a blocker.
Thank you. I think, we're almost there. 🙂 Leveraging the new The test that you've added covers the happy case well. But what happens if the JSON payload cannot be decoded? We should also have a test that covers this case. |
That's a good idea, I will add this test case tomorrow morning |
New tests have been added |
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.
Looks good, thank you!
Request::getPayload()
to populate the parsed body of PSR-7 requests
Thank you @AurelienPillevesse. |
getting error after updating to 2.3 Symfony\Component\HttpFoundation\Request::getPayload(): Return value must be of type Symfony\Component\HttpFoundation\InputBag, Symfony\Component\HttpFoundation\ParameterBag returned |
Please report this to the symfony/symfony repo. |
getting error TypeError: Symfony\Component\HttpFoundation\Request::getPayload(): Return value must be of type Symfony\Component\HttpFoundation\InputBag, Symfony\Component\HttpFoundation\ParameterBag returned in /var/www/vendor/symfony/http-foundation/Request.php:1517 It is unexpected critical issue in my project from yesterday. Please pay attention to it as fast as it possible. |
As @derrabus mentioned, please open a ticket on symfony/symfony. In the meantime, you can also provide a PR to fix the issue yourself or pin the 2.2.0 version from before |
Laravel people, this way: laravel/framework#47834 |
Please don't boss people around. I'm locking the PR now because I don't think we need more stack traces for the same Laravel issue. |
I'm trying to send a
POST
request with the fields below andapplication/x-www-form-urlencoded
header :If I send it like that, the fields are understood and I have these fields when I display the Request :
Now if I send the same
POST
request withapplication/json
header (with the same fields but inJSON
format) :They are not understand and I have an empty Request :