{"action":"created","comment":{"url":"https://api.github.com/repos/cakephp/cakephp/pulls/comments/80361362","id":80361362,"diff_hunk":"@@ -0,0 +1,270 @@\n+<?php\n+/**\n+ * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)\n+ * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)\n+ *\n+ * Licensed under The MIT License\n+ * For full copyright and license information, please see the LICENSE.txt\n+ * Redistributions of files must retain the above copyright notice.\n+ *\n+ * @copyright     Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)\n+ * @link          http://cakephp.org CakePHP(tm) Project\n+ * @since         3.3.5\n+ * @license       http://www.opensource.org/licenses/mit-license.php MIT License\n+ *\n+ * Parts of this file are derived from Zend-Diactoros\n+ *\n+ * @copyright Copyright (c) 2015-2016 Zend Technologies USA Inc. (http://www.zend.com)\n+ * @license   https://github.com/zendframework/zend-diactoros/blob/master/LICENSE.md New BSD License\n+ */\n+namespace Cake\\Http;\n+\n+use Cake\\Core\\Configure;\n+use Cake\\Log\\Log;\n+use Psr\\Http\\Message\\ResponseInterface;\n+use Zend\\Diactoros\\Response\\EmitterInterface;\n+use Zend\\Diactoros\\RelativeStream;\n+\n+/**\n+ * Emits a Response to the PHP Server API.\n+ *\n+ * This emitter offers a few changes from the emitters offered by\n+ * diactoros:\n+ *\n+ * - It logs headers sent using CakePHP's logging tools.\n+ * - Cookies are emitted using setcookie() to not conflict with ext/session\n+ */\n+class ResponseEmitter implements EmitterInterface\n+{\n+    /**\n+     * {@inheritDoc}\n+     */\n+    public function emit(ResponseInterface $response, $maxBufferLength = 8192)\n+    {\n+        $file = $line = null;\n+        if (headers_sent($file, $line)) {\n+            $message = \"Unable to emit headers. Headers sent in file=$file line=$line\";\n+            if (Configure::read('debug')) {\n+                trigger_error($message, E_USER_WARNING);\n+            } else {\n+                Log::warn($message);\n+            }\n+        }\n+\n+        $this->emitStatusLine($response);\n+        $this->emitHeaders($response);\n+        $this->flush();\n+\n+        $range = $this->parseContentRange($response->getHeaderLine('Content-Range'));\n+\n+        if (is_array($range)) {\n+            $this->emitBodyRange($range, $response, $maxBufferLength);\n+\n+            return;\n+        }\n+\n+        $this->emitBody($response, $maxBufferLength);\n+\n+        if (function_exists('fastcgi_finish_request')) {\n+            fastcgi_finish_request();\n+        }\n+    }\n+\n+    /**\n+     * Emit the message body.\n+     *\n+     * @param ResponseInterface $response\n+     * @param int $maxBufferLength\n+     * @return void\n+     */\n+    private function emitBody(ResponseInterface $response, $maxBufferLength)\n+    {\n+        $body = $response->getBody();\n+\n+        if (!$body->isSeekable()) {\n+            echo $body;\n+\n+            return;\n+        }\n+\n+        $body->rewind();\n+        while (!$body->eof()) {\n+            echo $body->read($maxBufferLength);\n+        }\n+    }\n+\n+    /**\n+     * Emit a range of the message body.\n+     *\n+     * @param array $range\n+     * @param ResponseInterface $response\n+     * @param int $maxBufferLength","path":"src/Http/ResponseEmitter.php","position":101,"original_position":101,"commit_id":"757fe52c1c0e8b60e44b9d1a8103a644271996c6","original_commit_id":"757fe52c1c0e8b60e44b9d1a8103a644271996c6","user":{"login":"stickler-ci","id":16011037,"avatar_url":"https://avatars.githubusercontent.com/u/16011037?v=3","gravatar_id":"","url":"https://api.github.com/users/stickler-ci","html_url":"https://github.com/stickler-ci","followers_url":"https://api.github.com/users/stickler-ci/followers","following_url":"https://api.github.com/users/stickler-ci/following{/other_user}","gists_url":"https://api.github.com/users/stickler-ci/gists{/gist_id}","starred_url":"https://api.github.com/users/stickler-ci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stickler-ci/subscriptions","organizations_url":"https://api.github.com/users/stickler-ci/orgs","repos_url":"https://api.github.com/users/stickler-ci/repos","events_url":"https://api.github.com/users/stickler-ci/events{/privacy}","received_events_url":"https://api.github.com/users/stickler-ci/received_events","type":"User","site_admin":false},"body":"Missing parameter comment","created_at":"2016-09-24T14:06:06Z","updated_at":"2016-09-24T14:06:07Z","html_url":"https://github.com/cakephp/cakephp/pull/9517#discussion_r80361362","pull_request_url":"https://api.github.com/repos/cakephp/cakephp/pulls/9517","_links":{"self":{"href":"https://api.github.com/repos/cakephp/cakephp/pulls/comments/80361362"},"html":{"href":"https://github.com/cakephp/cakephp/pull/9517#discussion_r80361362"},"pull_request":{"href":"https://api.github.com/repos/cakephp/cakephp/pulls/9517"}}},"pull_request":{"url":"https://api.github.com/repos/cakephp/cakephp/pulls/9517","id":86618984,"html_url":"https://github.com/cakephp/cakephp/pull/9517","diff_url":"https://github.com/cakephp/cakephp/pull/9517.diff","patch_url":"https://github.com/cakephp/cakephp/pull/9517.patch","issue_url":"https://api.github.com/repos/cakephp/cakephp/issues/9517","number":9517,"state":"open","locked":false,"title":"Add a simpler response emitter.","user":{"login":"markstory","id":24086,"avatar_url":"https://avatars.githubusercontent.com/u/24086?v=3","gravatar_id":"","url":"https://api.github.com/users/markstory","html_url":"https://github.com/markstory","followers_url":"https://api.github.com/users/markstory/followers","following_url":"https://api.github.com/users/markstory/following{/other_user}","gists_url":"https://api.github.com/users/markstory/gists{/gist_id}","starred_url":"https://api.github.com/users/markstory/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markstory/subscriptions","organizations_url":"https://api.github.com/users/markstory/orgs","repos_url":"https://api.github.com/users/markstory/repos","events_url":"https://api.github.com/users/markstory/events{/privacy}","received_events_url":"https://api.github.com/users/markstory/received_events","type":"User","site_admin":false},"body":"This new ResponseEmitter offers some improved ergonomics. It no longer:\r\n\r\n* Throws an exception when headers have been sent.\r\n* Truncates content when debug output has been generated in the  controller.\r\n\r\nIt also uses setcookie() which lets us remove the shims we had to apply to restore behavior of ext/session.\r\n\r\nRefs #9472","created_at":"2016-09-24T14:05:42Z","updated_at":"2016-09-24T14:06:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f28052b1d94f120f6b5e12c7c4d889daaeff7743","assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/cakephp/cakephp/milestones/100","html_url":"https://github.com/cakephp/cakephp/milestones/3.3.4","labels_url":"https://api.github.com/repos/cakephp/cakephp/milestones/100/labels","id":1981216,"number":100,"title":"3.3.4","description":"Bugfixes and minor features for 3.3.x","creator":{"login":"markstory","id":24086,"avatar_url":"https://avatars.githubusercontent.com/u/24086?v=3","gravatar_id":"","url":"https://api.github.com/users/markstory","html_url":"https://github.com/markstory","followers_url":"https://api.github.com/users/markstory/followers","following_url":"https://api.github.com/users/markstory/following{/other_user}","gists_url":"https://api.github.com/users/markstory/gists{/gist_id}","starred_url":"https://api.github.com/users/markstory/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markstory/subscriptions","organizations_url":"https://api.github.com/users/markstory/orgs","repos_url":"https://api.github.com/users/markstory/repos","events_url":"https://api.github.com/users/markstory/events{/privacy}","received_events_url":"https://api.github.com/users/markstory/received_events","type":"User","site_admin":false},"open_issues":40,"closed_issues":65,"state":"open","created_at":"2016-09-03T02:27:21Z","updated_at":"2016-09-24T14:05:50Z","due_on":"2016-09-23T00:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/cakephp/cakephp/pulls/9517/commits","review_comments_url":"https://api.github.com/repos/cakephp/cakephp/pulls/9517/comments","review_comment_url":"https://api.github.com/repos/cakephp/cakephp/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cakephp/cakephp/issues/9517/comments","statuses_url":"https://api.github.com/repos/cakephp/cakephp/statuses/757fe52c1c0e8b60e44b9d1a8103a644271996c6","head":{"label":"cakephp:response-emitter","ref":"response-emitter","sha":"757fe52c1c0e8b60e44b9d1a8103a644271996c6","user":{"login":"cakephp","id":23666,"avatar_url":"https://avatars.githubusercontent.com/u/23666?v=3","gravatar_id":"","url":"https://api.github.com/users/cakephp","html_url":"https://github.com/cakephp","followers_url":"https://api.github.com/users/cakephp/followers","following_url":"https://api.github.com/users/cakephp/following{/other_user}","gists_url":"https://api.github.com/users/cakephp/gists{/gist_id}","starred_url":"https://api.github.com/users/cakephp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cakephp/subscriptions","organizations_url":"https://api.github.com/users/cakephp/orgs","repos_url":"https://api.github.com/users/cakephp/repos","events_url":"https://api.github.com/users/cakephp/events{/privacy}","received_events_url":"https://api.github.com/users/cakephp/received_events","type":"Organization","site_admin":false},"repo":{"id":656494,"name":"cakephp","full_name":"cakephp/cakephp","owner":{"login":"cakephp","id":23666,"avatar_url":"https://avatars.githubusercontent.com/u/23666?v=3","gravatar_id":"","url":"https://api.github.com/users/cakephp","html_url":"https://github.com/cakephp","followers_url":"https://api.github.com/users/cakephp/followers","following_url":"https://api.github.com/users/cakephp/following{/other_user}","gists_url":"https://api.github.com/users/cakephp/gists{/gist_id}","starred_url":"https://api.github.com/users/cakephp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cakephp/subscriptions","organizations_url":"https://api.github.com/users/cakephp/orgs","repos_url":"https://api.github.com/users/cakephp/repos","events_url":"https://api.github.com/users/cakephp/events{/privacy}","received_events_url":"https://api.github.com/users/cakephp/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cakephp/cakephp","description":"CakePHP: The Rapid Development Framework for PHP - Official Repository","fork":false,"url":"https://api.github.com/repos/cakephp/cakephp","forks_url":"https://api.github.com/repos/cakephp/cakephp/forks","keys_url":"https://api.github.com/repos/cakephp/cakephp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cakephp/cakephp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cakephp/cakephp/teams","hooks_url":"https://api.github.com/repos/cakephp/cakephp/hooks","issue_events_url":"https://api.github.com/repos/cakephp/cakephp/issues/events{/number}","events_url":"https://api.github.com/repos/cakephp/cakephp/events","assignees_url":"https://api.github.com/repos/cakephp/cakephp/assignees{/user}","branches_url":"https://api.github.com/repos/cakephp/cakephp/branches{/branch}","tags_url":"https://api.github.com/repos/cakephp/cakephp/tags","blobs_url":"https://api.github.com/repos/cakephp/cakephp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cakephp/cakephp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cakephp/cakephp/git/refs{/sha}","trees_url":"https://api.github.com/repos/cakephp/cakephp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cakephp/cakephp/statuses/{sha}","languages_url":"https://api.github.com/repos/cakephp/cakephp/languages","stargazers_url":"https://api.github.com/repos/cakephp/cakephp/stargazers","contributors_url":"https://api.github.com/repos/cakephp/cakephp/contributors","subscribers_url":"https://api.github.com/repos/cakephp/cakephp/subscribers","subscription_url":"https://api.github.com/repos/cakephp/cakephp/subscription","commits_url":"https://api.github.com/repos/cakephp/cakephp/commits{/sha}","git_commits_url":"https://api.github.com/repos/cakephp/cakephp/git/commits{/sha}","comments_url":"https://api.github.com/repos/cakephp/cakephp/comments{/number}","issue_comment_url":"https://api.github.com/repos/cakephp/cakephp/issues/comments{/number}","contents_url":"https://api.github.com/repos/cakephp/cakephp/contents/{+path}","compare_url":"https://api.github.com/repos/cakephp/cakephp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cakephp/cakephp/merges","archive_url":"https://api.github.com/repos/cakephp/cakephp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cakephp/cakephp/downloads","issues_url":"https://api.github.com/repos/cakephp/cakephp/issues{/number}","pulls_url":"https://api.github.com/repos/cakephp/cakephp/pulls{/number}","milestones_url":"https://api.github.com/repos/cakephp/cakephp/milestones{/number}","notifications_url":"https://api.github.com/repos/cakephp/cakephp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cakephp/cakephp/labels{/name}","releases_url":"https://api.github.com/repos/cakephp/cakephp/releases{/id}","deployments_url":"https://api.github.com/repos/cakephp/cakephp/deployments","created_at":"2010-05-08T14:38:22Z","updated_at":"2016-09-24T11:30:45Z","pushed_at":"2016-09-24T14:05:42Z","git_url":"git://github.com/cakephp/cakephp.git","ssh_url":"git@github.com:cakephp/cakephp.git","clone_url":"https://github.com/cakephp/cakephp.git","svn_url":"https://github.com/cakephp/cakephp","homepage":"http://cakephp.org","size":131604,"stargazers_count":6720,"watchers_count":6720,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":3042,"mirror_url":null,"open_issues_count":188,"forks":3042,"open_issues":188,"watchers":6720,"default_branch":"master"}},"base":{"label":"cakephp:master","ref":"master","sha":"00da73e4129ca9c3ea0686a68ff3b0c0e718f5b5","user":{"login":"cakephp","id":23666,"avatar_url":"https://avatars.githubusercontent.com/u/23666?v=3","gravatar_id":"","url":"https://api.github.com/users/cakephp","html_url":"https://github.com/cakephp","followers_url":"https://api.github.com/users/cakephp/followers","following_url":"https://api.github.com/users/cakephp/following{/other_user}","gists_url":"https://api.github.com/users/cakephp/gists{/gist_id}","starred_url":"https://api.github.com/users/cakephp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cakephp/subscriptions","organizations_url":"https://api.github.com/users/cakephp/orgs","repos_url":"https://api.github.com/users/cakephp/repos","events_url":"https://api.github.com/users/cakephp/events{/privacy}","received_events_url":"https://api.github.com/users/cakephp/received_events","type":"Organization","site_admin":false},"repo":{"id":656494,"name":"cakephp","full_name":"cakephp/cakephp","owner":{"login":"cakephp","id":23666,"avatar_url":"https://avatars.githubusercontent.com/u/23666?v=3","gravatar_id":"","url":"https://api.github.com/users/cakephp","html_url":"https://github.com/cakephp","followers_url":"https://api.github.com/users/cakephp/followers","following_url":"https://api.github.com/users/cakephp/following{/other_user}","gists_url":"https://api.github.com/users/cakephp/gists{/gist_id}","starred_url":"https://api.github.com/users/cakephp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cakephp/subscriptions","organizations_url":"https://api.github.com/users/cakephp/orgs","repos_url":"https://api.github.com/users/cakephp/repos","events_url":"https://api.github.com/users/cakephp/events{/privacy}","received_events_url":"https://api.github.com/users/cakephp/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cakephp/cakephp","description":"CakePHP: The Rapid Development Framework for PHP - Official Repository","fork":false,"url":"https://api.github.com/repos/cakephp/cakephp","forks_url":"https://api.github.com/repos/cakephp/cakephp/forks","keys_url":"https://api.github.com/repos/cakephp/cakephp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cakephp/cakephp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cakephp/cakephp/teams","hooks_url":"https://api.github.com/repos/cakephp/cakephp/hooks","issue_events_url":"https://api.github.com/repos/cakephp/cakephp/issues/events{/number}","events_url":"https://api.github.com/repos/cakephp/cakephp/events","assignees_url":"https://api.github.com/repos/cakephp/cakephp/assignees{/user}","branches_url":"https://api.github.com/repos/cakephp/cakephp/branches{/branch}","tags_url":"https://api.github.com/repos/cakephp/cakephp/tags","blobs_url":"https://api.github.com/repos/cakephp/cakephp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cakephp/cakephp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cakephp/cakephp/git/refs{/sha}","trees_url":"https://api.github.com/repos/cakephp/cakephp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cakephp/cakephp/statuses/{sha}","languages_url":"https://api.github.com/repos/cakephp/cakephp/languages","stargazers_url":"https://api.github.com/repos/cakephp/cakephp/stargazers","contributors_url":"https://api.github.com/repos/cakephp/cakephp/contributors","subscribers_url":"https://api.github.com/repos/cakephp/cakephp/subscribers","subscription_url":"https://api.github.com/repos/cakephp/cakephp/subscription","commits_url":"https://api.github.com/repos/cakephp/cakephp/commits{/sha}","git_commits_url":"https://api.github.com/repos/cakephp/cakephp/git/commits{/sha}","comments_url":"https://api.github.com/repos/cakephp/cakephp/comments{/number}","issue_comment_url":"https://api.github.com/repos/cakephp/cakephp/issues/comments{/number}","contents_url":"https://api.github.com/repos/cakephp/cakephp/contents/{+path}","compare_url":"https://api.github.com/repos/cakephp/cakephp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cakephp/cakephp/merges","archive_url":"https://api.github.com/repos/cakephp/cakephp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cakephp/cakephp/downloads","issues_url":"https://api.github.com/repos/cakephp/cakephp/issues{/number}","pulls_url":"https://api.github.com/repos/cakephp/cakephp/pulls{/number}","milestones_url":"https://api.github.com/repos/cakephp/cakephp/milestones{/number}","notifications_url":"https://api.github.com/repos/cakephp/cakephp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cakephp/cakephp/labels{/name}","releases_url":"https://api.github.com/repos/cakephp/cakephp/releases{/id}","deployments_url":"https://api.github.com/repos/cakephp/cakephp/deployments","created_at":"2010-05-08T14:38:22Z","updated_at":"2016-09-24T11:30:45Z","pushed_at":"2016-09-24T14:05:42Z","git_url":"git://github.com/cakephp/cakephp.git","ssh_url":"git@github.com:cakephp/cakephp.git","clone_url":"https://github.com/cakephp/cakephp.git","svn_url":"https://github.com/cakephp/cakephp","homepage":"http://cakephp.org","size":131604,"stargazers_count":6720,"watchers_count":6720,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":3042,"mirror_url":null,"open_issues_count":188,"forks":3042,"open_issues":188,"watchers":6720,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cakephp/cakephp/pulls/9517"},"html":{"href":"https://github.com/cakephp/cakephp/pull/9517"},"issue":{"href":"https://api.github.com/repos/cakephp/cakephp/issues/9517"},"comments":{"href":"https://api.github.com/repos/cakephp/cakephp/issues/9517/comments"},"review_comments":{"href":"https://api.github.com/repos/cakephp/cakephp/pulls/9517/comments"},"review_comment":{"href":"https://api.github.com/repos/cakephp/cakephp/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cakephp/cakephp/pulls/9517/commits"},"statuses":{"href":"https://api.github.com/repos/cakephp/cakephp/statuses/757fe52c1c0e8b60e44b9d1a8103a644271996c6"}}}}
{"actor":{"display_login":"stickler-ci"}}