Skip to content

Commit b1fcf47

Browse files
committed
upgraded http-interop/http-middleware to 0.5
1 parent 1ead8f8 commit b1fcf47

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
},
1919
"require": {
2020
"php": "^5.6 || ^7.0",
21-
"http-interop/http-middleware": "^0.4",
22-
"middlewares/utils": "~0.8"
21+
"http-interop/http-middleware": "^0.5",
22+
"middlewares/utils": "~0.12"
2323
},
2424
"require-dev": {
2525
"phpunit/phpunit": "^5.5 || ^6.0",

src/TrailingSlash.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
namespace Middlewares;
44

5-
use Interop\Http\ServerMiddleware\DelegateInterface;
6-
use Interop\Http\ServerMiddleware\MiddlewareInterface;
5+
use Interop\Http\Server\MiddlewareInterface;
6+
use Interop\Http\Server\RequestHandlerInterface;
77
use Psr\Http\Message\ResponseInterface;
88
use Psr\Http\Message\ServerRequestInterface;
99

@@ -46,12 +46,12 @@ public function redirect($redirect = true)
4646
/**
4747
* Process a request and return a response.
4848
*
49-
* @param ServerRequestInterface $request
50-
* @param DelegateInterface $delegate
49+
* @param ServerRequestInterface $request
50+
* @param RequestHandlerInterface $handler
5151
*
5252
* @return ResponseInterface
5353
*/
54-
public function process(ServerRequestInterface $request, DelegateInterface $delegate)
54+
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler)
5555
{
5656
$uri = $request->getUri();
5757
$path = $this->normalize($uri->getPath());
@@ -61,7 +61,7 @@ public function process(ServerRequestInterface $request, DelegateInterface $dele
6161
->withHeader('Location', (string) $uri->withPath($path));
6262
}
6363

64-
return $delegate->process($request->withUri($uri->withPath($path)));
64+
return $handler->handle($request->withUri($uri->withPath($path)));
6565
}
6666

6767
/**

0 commit comments

Comments
 (0)