{"action":"closed","issue":{"url":"https://api.github.com/repos/http-interop/http-middleware/issues/15","repository_url":"https://api.github.com/repos/http-interop/http-middleware","labels_url":"https://api.github.com/repos/http-interop/http-middleware/issues/15/labels{/name}","comments_url":"https://api.github.com/repos/http-interop/http-middleware/issues/15/comments","events_url":"https://api.github.com/repos/http-interop/http-middleware/issues/15/events","html_url":"https://github.com/http-interop/http-middleware/issues/15","id":173641000,"number":15,"title":"Inconsistent names and descriptions","user":{"login":"mindplay-dk","id":103348,"avatar_url":"https://avatars.githubusercontent.com/u/103348?v=3","gravatar_id":"","url":"https://api.github.com/users/mindplay-dk","html_url":"https://github.com/mindplay-dk","followers_url":"https://api.github.com/users/mindplay-dk/followers","following_url":"https://api.github.com/users/mindplay-dk/following{/other_user}","gists_url":"https://api.github.com/users/mindplay-dk/gists{/gist_id}","starred_url":"https://api.github.com/users/mindplay-dk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mindplay-dk/subscriptions","organizations_url":"https://api.github.com/users/mindplay-dk/orgs","repos_url":"https://api.github.com/users/mindplay-dk/repos","events_url":"https://api.github.com/users/mindplay-dk/events{/privacy}","received_events_url":"https://api.github.com/users/mindplay-dk/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":16,"created_at":"2016-08-28T11:06:39Z","updated_at":"2016-09-25T18:23:51Z","closed_at":"2016-09-25T18:23:51Z","body":"`MiddlewareInterface` has this signature:\r\n\r\n    public function process(RequestInterface $request, DelegateInterface $next);\r\n\r\nBut `ServerMiddlewareInterface` has this signature:\r\n\r\n    public function process(ServerRequestInterface $request, DelegateInterface $frame);\r\n\r\nThe delegate is `$next` in one place and `$frame` in another.\r\n\r\nI don't recall precisely what we decided, but I think there was general agreement not to refer to the delegate as a \"frame\"? Inline documentation for `ServerMiddlewareInterface` also presently says:\r\n\r\n    Takes the incoming request and optionally modifies it before delegating\r\n    to the next frame to get a response.\r\n\r\nI would suggest the following:\r\n\r\n    Takes the incoming Request and returns a Response, optionally delegating\r\n    to the next middleware component to create the Response.\r\n\r\nAlso, the `DelegateInterface` method is named `next()`, so when middleware code delegates to the next middleware, it comes out `return $next->next($request)`, which is not very semantic - something like `return $next->delegate($request)` or `return $delegate->process($request)` would be more meaningful.\r\n\r\n(I don't think using the name `process()` in the middleware-delegate would be an issue? I can't imagine a case where a middleware delegate implementation is also a middleware component, can you?)\r\n\r\nFinally, the first line of the description of `MiddlewareInterface` reads:\r\n\r\n    Process a client request and return a response.\r\n\r\nBut this interface is for middleware that works on both for client and server-requests, right? So:\r\n\r\n    Process a client or server Request and return a Response.\r\n\r\n@http-interop/http-middleware-contributors I can PR these changes if there is no disagreement? Let me know.\r\n"}}
{"actor":{"display_login":"shadowhand"}}