Skip to content
Merged
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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/).

## [3.2.1] - 2018-10-24
### Summary
- Widen range of supported Zend Diactoros version

## [3.2.0] - 2018-09-19
### Summary
- Added support for `PATCH` HTTP method
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"psr/http-server-handler": "^1.0",
"psr/http-server-middleware": "^1.0",
"psr/log": "^1.0",
"zendframework/zend-diactoros": "^1.3"
"zendframework/zend-diactoros": "^1.3 || ^2.0"
},
"suggest": {
"firehed/inputobjects": "Pre-made Input components for validation"
Expand Down
2 changes: 2 additions & 0 deletions src/Dispatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,8 @@ private function transformRequestToServerRequest(RequestInterface $request): Ser
foreach ($request->getHeaders() as $name => $values) {
$serverRequest = $serverRequest->withHeader($name, $values);
}
// ZD2 hints the return type of withHeader to MessageInterface not SRI
assert($serverRequest instanceof ServerRequestInterface);
return $serverRequest;
}

Expand Down
1 change: 1 addition & 0 deletions tests/DispatcherTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ public function testSetRequestReturnsSelf()
{
$d = new Dispatcher();
$req = $this->createMock(RequestInterface::class);
$req->method('getMethod')->willReturn('GET');
$req->method('getHeaders')->willReturn([]);
$req->method('getBody')->willReturn($this->createMock(StreamInterface::class));
$req->method('getUri')->willReturn($this->createMock(UriInterface::class));
Expand Down