-
Notifications
You must be signed in to change notification settings - Fork 18
#63 no json_decode() call if request body is empty #64
Conversation
|
||
if (empty($rawBody)) { | ||
return $request | ||
->withAttribute('rawBody', $rawBody) |
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.
Why are you adding this attribute? The raw body can already be accessed via $request->getBody()
, making this redundant information.
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.
@weierophinney Without my change, this was added as well, so i was keeping it to not introduce some kind of BC break. See: https://github.com/zendframework/zend-expressive-helpers/pull/64/files#diff-2def9921da214e2d356d90bbcf2ef2d9R60
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.
Hmmm... okay.
We should likely revisit that in the next major version, as we shouldn't be doing that!
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.
Yep, good point. I opened #65 for that.
Forward port #64 Conflicts: CHANGELOG.md
Thanks, @BreiteSeite! |
Fixes #63
Provide a narrative description of what you are trying to accomplish:
master
branch, and submit against that branch.CHANGELOG.md
entry for the fix.