Skip to content

Commit 4519113

Browse files
committed
Remove empty middleware interface
Empty middleware interface does nothing only existed as a convenience for stack/dispatch. By removing the stack interface, we no longer need the empty interface. This also removes the need to have a "client" middleware interface. Since all "client" middleware can be used in server context, there is no need to imply that it is "client-only". Refs #3 Fixes #11
1 parent 69f2eda commit 4519113

4 files changed

+16
-70
lines changed

src/ClientMiddlewareInterface.php

-22
This file was deleted.

src/MiddlewareInterface.php

+15
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,21 @@
22

33
namespace Psr\Http\Middleware;
44

5+
use Psr\Http\Message\RequestInterface;
6+
use Psr\Http\Message\ResponseInterface;
7+
58
interface MiddlewareInterface
69
{
10+
/**
11+
* Process a client request and return a response.
12+
*
13+
* Takes the incoming request and optionally modifies it before delegating
14+
* to the next frame to get a response.
15+
*
16+
* @param RequestInterface $request
17+
* @param DelegateInterface $next
18+
*
19+
* @return ResponseInterface
20+
*/
21+
public function process(RequestInterface $request, DelegateInterface $next);
722
}

src/ServerMiddlewareInterface.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
use Psr\Http\Message\ResponseInterface;
66
use Psr\Http\Message\ServerRequestInterface;
77

8-
interface ServerMiddlewareInterface extends MiddlewareInterface
8+
interface ServerMiddlewareInterface
99
{
1010
/**
1111
* Process a server request and return a response.

src/StackInterface.php

-47
This file was deleted.

0 commit comments

Comments
 (0)