{"action":"created","comment":{"url":"https://api.github.com/repos/zendframework/zend-stratigility/pulls/comments/86293939","pull_request_review_id":6956748,"id":86293939,"diff_hunk":"@@ -9,13 +9,15 @@\n \n use ErrorException;\n use Exception;\n+use Interop\\Http\\Middleware\\DelegateInterface;\n+use Interop\\Http\\Middleware\\ServerMiddlewareInterface;\n use Psr\\Http\\Message\\ServerRequestInterface;\n use Psr\\Http\\Message\\ResponseInterface;\n use Throwable;\n use Zend\\Escaper\\Escaper;\n+use Zend\\Stratigility\\Delegate\\CallableDelegateDecorator;\n use Zend\\Stratigility\\Exception\\MissingDelegateException;\n use Zend\\Stratigility\\Exception\\MissingResponseException;\n-use Zend\\Stratigility\\MiddlewareInterface;\n use Zend\\Stratigility\\Utils;","path":"src/Middleware/ErrorHandler.php","position":14,"original_position":14,"commit_id":"5cc396bad68c56551befc239ef90bf5e46a704d8","original_commit_id":"5cc396bad68c56551befc239ef90bf5e46a704d8","user":{"login":"xtreamwayz","id":9497586,"avatar_url":"https://avatars.githubusercontent.com/u/9497586?v=3","gravatar_id":"","url":"https://api.github.com/users/xtreamwayz","html_url":"https://github.com/xtreamwayz","followers_url":"https://api.github.com/users/xtreamwayz/followers","following_url":"https://api.github.com/users/xtreamwayz/following{/other_user}","gists_url":"https://api.github.com/users/xtreamwayz/gists{/gist_id}","starred_url":"https://api.github.com/users/xtreamwayz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xtreamwayz/subscriptions","organizations_url":"https://api.github.com/users/xtreamwayz/orgs","repos_url":"https://api.github.com/users/xtreamwayz/repos","events_url":"https://api.github.com/users/xtreamwayz/events{/privacy}","received_events_url":"https://api.github.com/users/xtreamwayz/received_events","type":"User","site_admin":false},"body":"Unused imports\r\n\r\n```\r\nuse Zend\\Escaper\\Escaper;\r\nuse Zend\\Stratigility\\Exception\\MissingDelegateException;\r\nuse Zend\\Stratigility\\Utils;\r\n```","created_at":"2016-11-03T07:22:03Z","updated_at":"2016-11-03T08:00:50Z","html_url":"https://github.com/zendframework/zend-stratigility/pull/75#discussion_r86293939","pull_request_url":"https://api.github.com/repos/zendframework/zend-stratigility/pulls/75","_links":{"self":{"href":"https://api.github.com/repos/zendframework/zend-stratigility/pulls/comments/86293939"},"html":{"href":"https://github.com/zendframework/zend-stratigility/pull/75#discussion_r86293939"},"pull_request":{"href":"https://api.github.com/repos/zendframework/zend-stratigility/pulls/75"}}},"pull_request":{"url":"https://api.github.com/repos/zendframework/zend-stratigility/pulls/75","id":92045484,"html_url":"https://github.com/zendframework/zend-stratigility/pull/75","diff_url":"https://github.com/zendframework/zend-stratigility/pull/75.diff","patch_url":"https://github.com/zendframework/zend-stratigility/pull/75.patch","issue_url":"https://api.github.com/repos/zendframework/zend-stratigility/issues/75","number":75,"state":"open","locked":false,"title":"Provide http-interop compatibility","user":{"login":"weierophinney","id":25943,"avatar_url":"https://avatars.githubusercontent.com/u/25943?v=3","gravatar_id":"","url":"https://api.github.com/users/weierophinney","html_url":"https://github.com/weierophinney","followers_url":"https://api.github.com/users/weierophinney/followers","following_url":"https://api.github.com/users/weierophinney/following{/other_user}","gists_url":"https://api.github.com/users/weierophinney/gists{/gist_id}","starred_url":"https://api.github.com/users/weierophinney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weierophinney/subscriptions","organizations_url":"https://api.github.com/users/weierophinney/orgs","repos_url":"https://api.github.com/users/weierophinney/repos","events_url":"https://api.github.com/users/weierophinney/events{/privacy}","received_events_url":"https://api.github.com/users/weierophinney/received_events","type":"User","site_admin":false},"body":"This patch provides compatibility with http-interop 0.2.0, via the following features:\n\n- `MiddlewarePipe`:\n  - now implements `ServerMiddlewareInterface`.\n  - now allows piping http-interop `ServerMiddlewareInterface` and `MiddlewareInterface` instances.\n  - now allows piping callable middleware with the signature:\n\n    ```php\n    function ($request, DelegateInterface $delegate) : ResponseInterface\n    ```\n\n  - Now exposes a `setResponsePrototype()` method; when set, callable middleware implementing the legacy interface will be decorated as `ServerMiddlewareInterface` instances.\n\n- `Next`:\n  - Now implements `DelegateInterface`.\n\n- `Dispatch`:\n  - Now provides a `process()` method mimicing the `DelegateInterface`; this method is used by `Next` when dispatching `ServerMiddlewareInterface` instances.\n  - Now identifies http-interop middleware and dispatches them properly.\n\nAdditionally, this patch provides decorator classes for decorating legacy callable middleware, callable middleware compatible with `ServerMiddlewareInterface`, and callable delegates. This latter feature can be used to adapt existing callable middleware classes to implement `ServerMiddlewareInterface`:\n\n```php\nuse Psr\\Http\\Message\\ResponseInterface;\nuse Psr\\Http\\Message\\ServerRequestInterface;\nuse Psr\\Http\\Middleware\\DelegateInterface;\nuse Psr\\Http\\Middleware\\ServerMiddlewareInterface;\nuse Zend\\Diactoros\\Response\\JsonResponse;\nuse Zend\\Stratigility\\Delegate\\CallableDelegateDecorator;\n\nclass PingMiddleware implements ServerMiddlewareInterface\n{\n    public function __invoke(\n        ServerRequestInterface $request,\n        ResponseInterface $response,\n        callable $next\n    ) {\n        return $this->process($request, new CallableDelegateDecorator($next, $response));\n    }\n\n    public function process(ServerRequestInterface $request, DelegateInterface $delegate)\n    {\n        return new JsonResponse(['ack' => time()]);\n    }\n}\n```\n\nFinally, the patch provides migration documentation to both v1.3 and v2.0. Another patch will be submitted shortly against the dev-2.0.0 branch that incorporates the patches from this branch, with updates to provide the final 2.0.0 functionality around http-interop compatibility.","created_at":"2016-11-02T20:08:13Z","updated_at":"2016-11-03T08:00:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2d587e116853eb3694fcccc8ae52f9ecf11244d2","assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/zendframework/zend-stratigility/milestones/10","html_url":"https://github.com/zendframework/zend-stratigility/milestones/1.3.0","labels_url":"https://api.github.com/repos/zendframework/zend-stratigility/milestones/10/labels","id":2029436,"number":10,"title":"1.3.0","description":null,"creator":{"login":"weierophinney","id":25943,"avatar_url":"https://avatars.githubusercontent.com/u/25943?v=3","gravatar_id":"","url":"https://api.github.com/users/weierophinney","html_url":"https://github.com/weierophinney","followers_url":"https://api.github.com/users/weierophinney/followers","following_url":"https://api.github.com/users/weierophinney/following{/other_user}","gists_url":"https://api.github.com/users/weierophinney/gists{/gist_id}","starred_url":"https://api.github.com/users/weierophinney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weierophinney/subscriptions","organizations_url":"https://api.github.com/users/weierophinney/orgs","repos_url":"https://api.github.com/users/weierophinney/repos","events_url":"https://api.github.com/users/weierophinney/events{/privacy}","received_events_url":"https://api.github.com/users/weierophinney/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":2,"state":"open","created_at":"2016-09-26T17:05:41Z","updated_at":"2016-11-02T20:09:36Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/zendframework/zend-stratigility/pulls/75/commits","review_comments_url":"https://api.github.com/repos/zendframework/zend-stratigility/pulls/75/comments","review_comment_url":"https://api.github.com/repos/zendframework/zend-stratigility/pulls/comments{/number}","comments_url":"https://api.github.com/repos/zendframework/zend-stratigility/issues/75/comments","statuses_url":"https://api.github.com/repos/zendframework/zend-stratigility/statuses/5cc396bad68c56551befc239ef90bf5e46a704d8","head":{"label":"weierophinney:feature/psr-15-compat","ref":"feature/psr-15-compat","sha":"5cc396bad68c56551befc239ef90bf5e46a704d8","user":{"login":"weierophinney","id":25943,"avatar_url":"https://avatars.githubusercontent.com/u/25943?v=3","gravatar_id":"","url":"https://api.github.com/users/weierophinney","html_url":"https://github.com/weierophinney","followers_url":"https://api.github.com/users/weierophinney/followers","following_url":"https://api.github.com/users/weierophinney/following{/other_user}","gists_url":"https://api.github.com/users/weierophinney/gists{/gist_id}","starred_url":"https://api.github.com/users/weierophinney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weierophinney/subscriptions","organizations_url":"https://api.github.com/users/weierophinney/orgs","repos_url":"https://api.github.com/users/weierophinney/repos","events_url":"https://api.github.com/users/weierophinney/events{/privacy}","received_events_url":"https://api.github.com/users/weierophinney/received_events","type":"User","site_admin":false},"repo":{"id":36084562,"name":"zend-stratigility","full_name":"weierophinney/zend-stratigility","owner":{"login":"weierophinney","id":25943,"avatar_url":"https://avatars.githubusercontent.com/u/25943?v=3","gravatar_id":"","url":"https://api.github.com/users/weierophinney","html_url":"https://github.com/weierophinney","followers_url":"https://api.github.com/users/weierophinney/followers","following_url":"https://api.github.com/users/weierophinney/following{/other_user}","gists_url":"https://api.github.com/users/weierophinney/gists{/gist_id}","starred_url":"https://api.github.com/users/weierophinney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weierophinney/subscriptions","organizations_url":"https://api.github.com/users/weierophinney/orgs","repos_url":"https://api.github.com/users/weierophinney/repos","events_url":"https://api.github.com/users/weierophinney/events{/privacy}","received_events_url":"https://api.github.com/users/weierophinney/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/weierophinney/zend-stratigility","description":"Middleware for PHP built on top of PSR-7","fork":true,"url":"https://api.github.com/repos/weierophinney/zend-stratigility","forks_url":"https://api.github.com/repos/weierophinney/zend-stratigility/forks","keys_url":"https://api.github.com/repos/weierophinney/zend-stratigility/keys{/key_id}","collaborators_url":"https://api.github.com/repos/weierophinney/zend-stratigility/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/weierophinney/zend-stratigility/teams","hooks_url":"https://api.github.com/repos/weierophinney/zend-stratigility/hooks","issue_events_url":"https://api.github.com/repos/weierophinney/zend-stratigility/issues/events{/number}","events_url":"https://api.github.com/repos/weierophinney/zend-stratigility/events","assignees_url":"https://api.github.com/repos/weierophinney/zend-stratigility/assignees{/user}","branches_url":"https://api.github.com/repos/weierophinney/zend-stratigility/branches{/branch}","tags_url":"https://api.github.com/repos/weierophinney/zend-stratigility/tags","blobs_url":"https://api.github.com/repos/weierophinney/zend-stratigility/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/weierophinney/zend-stratigility/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/weierophinney/zend-stratigility/git/refs{/sha}","trees_url":"https://api.github.com/repos/weierophinney/zend-stratigility/git/trees{/sha}","statuses_url":"https://api.github.com/repos/weierophinney/zend-stratigility/statuses/{sha}","languages_url":"https://api.github.com/repos/weierophinney/zend-stratigility/languages","stargazers_url":"https://api.github.com/repos/weierophinney/zend-stratigility/stargazers","contributors_url":"https://api.github.com/repos/weierophinney/zend-stratigility/contributors","subscribers_url":"https://api.github.com/repos/weierophinney/zend-stratigility/subscribers","subscription_url":"https://api.github.com/repos/weierophinney/zend-stratigility/subscription","commits_url":"https://api.github.com/repos/weierophinney/zend-stratigility/commits{/sha}","git_commits_url":"https://api.github.com/repos/weierophinney/zend-stratigility/git/commits{/sha}","comments_url":"https://api.github.com/repos/weierophinney/zend-stratigility/comments{/number}","issue_comment_url":"https://api.github.com/repos/weierophinney/zend-stratigility/issues/comments{/number}","contents_url":"https://api.github.com/repos/weierophinney/zend-stratigility/contents/{+path}","compare_url":"https://api.github.com/repos/weierophinney/zend-stratigility/compare/{base}...{head}","merges_url":"https://api.github.com/repos/weierophinney/zend-stratigility/merges","archive_url":"https://api.github.com/repos/weierophinney/zend-stratigility/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/weierophinney/zend-stratigility/downloads","issues_url":"https://api.github.com/repos/weierophinney/zend-stratigility/issues{/number}","pulls_url":"https://api.github.com/repos/weierophinney/zend-stratigility/pulls{/number}","milestones_url":"https://api.github.com/repos/weierophinney/zend-stratigility/milestones{/number}","notifications_url":"https://api.github.com/repos/weierophinney/zend-stratigility/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/weierophinney/zend-stratigility/labels{/name}","releases_url":"https://api.github.com/repos/weierophinney/zend-stratigility/releases{/id}","deployments_url":"https://api.github.com/repos/weierophinney/zend-stratigility/deployments","created_at":"2015-05-22T17:02:12Z","updated_at":"2015-05-22T17:02:12Z","pushed_at":"2016-11-02T21:11:20Z","git_url":"git://github.com/weierophinney/zend-stratigility.git","ssh_url":"git@github.com:weierophinney/zend-stratigility.git","clone_url":"https://github.com/weierophinney/zend-stratigility.git","svn_url":"https://github.com/weierophinney/zend-stratigility","homepage":null,"size":449,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"zendframework:develop","ref":"develop","sha":"69ef87f2dfb238590a77c0b644d9afd6b85da394","user":{"login":"zendframework","id":296074,"avatar_url":"https://avatars.githubusercontent.com/u/296074?v=3","gravatar_id":"","url":"https://api.github.com/users/zendframework","html_url":"https://github.com/zendframework","followers_url":"https://api.github.com/users/zendframework/followers","following_url":"https://api.github.com/users/zendframework/following{/other_user}","gists_url":"https://api.github.com/users/zendframework/gists{/gist_id}","starred_url":"https://api.github.com/users/zendframework/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zendframework/subscriptions","organizations_url":"https://api.github.com/users/zendframework/orgs","repos_url":"https://api.github.com/users/zendframework/repos","events_url":"https://api.github.com/users/zendframework/events{/privacy}","received_events_url":"https://api.github.com/users/zendframework/received_events","type":"Organization","site_admin":false},"repo":{"id":36027437,"name":"zend-stratigility","full_name":"zendframework/zend-stratigility","owner":{"login":"zendframework","id":296074,"avatar_url":"https://avatars.githubusercontent.com/u/296074?v=3","gravatar_id":"","url":"https://api.github.com/users/zendframework","html_url":"https://github.com/zendframework","followers_url":"https://api.github.com/users/zendframework/followers","following_url":"https://api.github.com/users/zendframework/following{/other_user}","gists_url":"https://api.github.com/users/zendframework/gists{/gist_id}","starred_url":"https://api.github.com/users/zendframework/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zendframework/subscriptions","organizations_url":"https://api.github.com/users/zendframework/orgs","repos_url":"https://api.github.com/users/zendframework/repos","events_url":"https://api.github.com/users/zendframework/events{/privacy}","received_events_url":"https://api.github.com/users/zendframework/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/zendframework/zend-stratigility","description":"Middleware for PHP built on top of PSR-7","fork":false,"url":"https://api.github.com/repos/zendframework/zend-stratigility","forks_url":"https://api.github.com/repos/zendframework/zend-stratigility/forks","keys_url":"https://api.github.com/repos/zendframework/zend-stratigility/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zendframework/zend-stratigility/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zendframework/zend-stratigility/teams","hooks_url":"https://api.github.com/repos/zendframework/zend-stratigility/hooks","issue_events_url":"https://api.github.com/repos/zendframework/zend-stratigility/issues/events{/number}","events_url":"https://api.github.com/repos/zendframework/zend-stratigility/events","assignees_url":"https://api.github.com/repos/zendframework/zend-stratigility/assignees{/user}","branches_url":"https://api.github.com/repos/zendframework/zend-stratigility/branches{/branch}","tags_url":"https://api.github.com/repos/zendframework/zend-stratigility/tags","blobs_url":"https://api.github.com/repos/zendframework/zend-stratigility/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zendframework/zend-stratigility/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zendframework/zend-stratigility/git/refs{/sha}","trees_url":"https://api.github.com/repos/zendframework/zend-stratigility/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zendframework/zend-stratigility/statuses/{sha}","languages_url":"https://api.github.com/repos/zendframework/zend-stratigility/languages","stargazers_url":"https://api.github.com/repos/zendframework/zend-stratigility/stargazers","contributors_url":"https://api.github.com/repos/zendframework/zend-stratigility/contributors","subscribers_url":"https://api.github.com/repos/zendframework/zend-stratigility/subscribers","subscription_url":"https://api.github.com/repos/zendframework/zend-stratigility/subscription","commits_url":"https://api.github.com/repos/zendframework/zend-stratigility/commits{/sha}","git_commits_url":"https://api.github.com/repos/zendframework/zend-stratigility/git/commits{/sha}","comments_url":"https://api.github.com/repos/zendframework/zend-stratigility/comments{/number}","issue_comment_url":"https://api.github.com/repos/zendframework/zend-stratigility/issues/comments{/number}","contents_url":"https://api.github.com/repos/zendframework/zend-stratigility/contents/{+path}","compare_url":"https://api.github.com/repos/zendframework/zend-stratigility/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zendframework/zend-stratigility/merges","archive_url":"https://api.github.com/repos/zendframework/zend-stratigility/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zendframework/zend-stratigility/downloads","issues_url":"https://api.github.com/repos/zendframework/zend-stratigility/issues{/number}","pulls_url":"https://api.github.com/repos/zendframework/zend-stratigility/pulls{/number}","milestones_url":"https://api.github.com/repos/zendframework/zend-stratigility/milestones{/number}","notifications_url":"https://api.github.com/repos/zendframework/zend-stratigility/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zendframework/zend-stratigility/labels{/name}","releases_url":"https://api.github.com/repos/zendframework/zend-stratigility/releases{/id}","deployments_url":"https://api.github.com/repos/zendframework/zend-stratigility/deployments","created_at":"2015-05-21T17:32:20Z","updated_at":"2016-10-27T04:36:46Z","pushed_at":"2016-11-02T21:11:21Z","git_url":"git://github.com/zendframework/zend-stratigility.git","ssh_url":"git@github.com:zendframework/zend-stratigility.git","clone_url":"https://github.com/zendframework/zend-stratigility.git","svn_url":"https://github.com/zendframework/zend-stratigility","homepage":"https://zendframework.github.io/zend-stratigility/","size":940,"stargazers_count":158,"watchers_count":158,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":42,"mirror_url":null,"open_issues_count":12,"forks":42,"open_issues":12,"watchers":158,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/zendframework/zend-stratigility/pulls/75"},"html":{"href":"https://github.com/zendframework/zend-stratigility/pull/75"},"issue":{"href":"https://api.github.com/repos/zendframework/zend-stratigility/issues/75"},"comments":{"href":"https://api.github.com/repos/zendframework/zend-stratigility/issues/75/comments"},"review_comments":{"href":"https://api.github.com/repos/zendframework/zend-stratigility/pulls/75/comments"},"review_comment":{"href":"https://api.github.com/repos/zendframework/zend-stratigility/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/zendframework/zend-stratigility/pulls/75/commits"},"statuses":{"href":"https://api.github.com/repos/zendframework/zend-stratigility/statuses/5cc396bad68c56551befc239ef90bf5e46a704d8"}}}}
{"actor":{"display_login":"xtreamwayz"}}