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

Update to psr/http-message 0.9.0 #33

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
16 changes: 13 additions & 3 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": "dev-feature/parsed-body@dev",
"psr/http-message": "dev-feature/parsed-body@dev",
"zendframework/zend-escaper": "~2.3@stable"
},
"require-dev": {
Expand All @@ -44,5 +44,15 @@
"psr-4": {
"PhlyTest\\Conduit\\": "test/"
}
}
},
"repositories": [
{
"type": "vcs",
"url": "https://github.com/weierophinney/http-message.git"
},
{
"type": "vcs",
"url": "https://github.com/weierophinney/http.git"
}
]
}
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