From d32ef7f184893a7435af845d19a6995cc237546f Mon Sep 17 00:00:00 2001 From: Matthew Weier O'Phinney Date: Wed, 11 Feb 2015 13:24:16 -0600 Subject: [PATCH 1/3] Updated to latest psr/http-message, phly/http --- composer.json | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index 6fcd964..e4f13ba 100644 --- a/composer.json +++ b/composer.json @@ -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": { @@ -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" + } + ] } From f8ab86ad3f0a8b56928e76215eb63037187c0ab1 Mon Sep 17 00:00:00 2001 From: Matthew Weier O'Phinney Date: Wed, 11 Feb 2015 13:25:50 -0600 Subject: [PATCH 2/3] Use ParsedBody instead of BodyParams To sync with latest psr/http-message specification. --- src/Http/Request.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Http/Request.php b/src/Http/Request.php index c8aa10a..ffa2ed2 100644 --- a/src/Http/Request.php +++ b/src/Http/Request.php @@ -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); } From 04a81f885b4b255d4f853ed56ee3c8413bbad96f Mon Sep 17 00:00:00 2001 From: Matthew Weier O'Phinney Date: Wed, 11 Feb 2015 13:28:24 -0600 Subject: [PATCH 3/3] Updated changelog --- CHANGELOG.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ab3c460..12974ce 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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