Skip to content
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

[HttpClient] Do not allow setting both json and body #31044

Merged

Conversation

Projects
None yet
6 participants
@gisostallenberg
Copy link
Contributor

commented Apr 9, 2019

Q A
Branch? master
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #30769
License MIT
Doc PR n/a

This will keep developers from using both the options $options['body'] and $options['json']. Using both results in only json being the body of the request, which might lead to unexpected results.

@gisostallenberg gisostallenberg force-pushed the gisostallenberg:httpclient-disallow-both-json-and-body branch 2 times, most recently from df3c98f to 0957c13 Apr 9, 2019

@nicolas-grekas nicolas-grekas added this to the next milestone Apr 10, 2019

@gisostallenberg gisostallenberg changed the title [HttpClient] Do not allow setting both json and body to something different [HttpClient] Do not allow setting both json and body Apr 10, 2019

@gisostallenberg

This comment has been minimized.

Copy link
Contributor Author

commented Apr 10, 2019

The appveyor failure seems unrelated to my changes

@fabpot

fabpot approved these changes Apr 10, 2019

@fabpot fabpot force-pushed the gisostallenberg:httpclient-disallow-both-json-and-body branch from 6dcb434 to 601adf5 Apr 10, 2019

@fabpot

This comment has been minimized.

Copy link
Member

commented Apr 10, 2019

Thank you @gisostallenberg.

@fabpot fabpot merged commit 601adf5 into symfony:master Apr 10, 2019

1 of 3 checks passed

continuous-integration/appveyor/pr Waiting for AppVeyor build to complete
Details
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
fabbot.io Your code looks good.
Details

fabpot added a commit that referenced this pull request Apr 10, 2019

bug #31044 [HttpClient] Do not allow setting both json and body (giso…
…stallenberg)

This PR was squashed before being merged into the 4.3-dev branch (closes #31044).

Discussion
----------

[HttpClient] Do not allow setting both json and body

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #30769
| License       | MIT
| Doc PR        | n/a

This will keep developers from using both the options `$options['body']` and `$options['json']`. Using both results in only json being the body of the request, which might lead to unexpected results.

Commits
-------

601adf5 [HttpClient] Do not allow setting both json and body
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.