Skip to content

Commit

Permalink
Merge branch 'feature/parsed-body'
Browse files Browse the repository at this point in the history
Close #33
  • Loading branch information
weierophinney committed Feb 17, 2015
2 parents a5fa988 + 0d26741 commit 181ef02
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 9 deletions.
25 changes: 25 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,31 @@

All notable changes to this project will be documented in this file, in reverse chronological order by release..

## 0.14.0 - TBD

This release updates its dependencies to use psr/http-message >= 0.9.0 and
phly/http >= 0.11.0. The primary changes that affect Conduit regard changes to
`Psr\Http\Message\ServerRequestInterface`, which required method name and
signature changes in `Phly\Conduit\Http\Request`.

### Added

- `Phly\Conduit\Http\Request::getParsedBody()` (replaces `getBodyParams()`).
- `Phly\Conduit\Http\Request::withParsedBody()` (replaces `withBodyParams()`).

### Deprecated

- Nothing.

### Removed

- `Phly\Conduit\Http\Request::getBodyParams()` (replaced by `getParsedBody()`).
- `Phly\Conduit\Http\Request::withBodyParams()` (replaced by `withParsedBody()`).

### Fixed

- Nothing.

## 0.13.0 - 2015-01-28

This release updates its dependencies to use psr/http-message >= 0.8.0 and
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
},
"require": {
"php": ">=5.4.8",
"phly/http": "~0.10.0",
"psr/http-message": "~0.8.0",
"phly/http": "^0.11",
"psr/http-message": "^0.9",
"zendframework/zend-escaper": "~2.3@stable"
},
"require-dev": {
Expand Down
14 changes: 7 additions & 7 deletions src/Http/Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -327,25 +327,25 @@ public function getFileParams()
}

/**
* Proxy to ServerRequestInterface::getBodyParams()
* Proxy to ServerRequestInterface::getParsedBody()
*
*
* @return array The deserialized body parameters, if any.
*/
public function getBodyParams()
public function getParsedBody()
{
return $this->psrRequest->getBodyParams();
return $this->psrRequest->getParsedBody();
}

/**
* Proxy to ServerRequestInterface::withBodyParams()
* Proxy to ServerRequestInterface::withParsedBody()
*
* @param array $params The deserialized body parameters.
* @param null|array|object $params The deserialized body parameters.
* @return self
*/
public function withBodyParams(array $params)
public function withParsedBody($params)
{
$new = $this->psrRequest->withBodyParams($params);
$new = $this->psrRequest->withParsedBody($params);
return new self($new, $this->originalRequest);
}

Expand Down

0 comments on commit 181ef02

Please sign in to comment.