{"action":"created","comment":{"url":"https://api.github.com/repos/guzzle/guzzle/pulls/comments/139295031","pull_request_review_id":63211727,"id":139295031,"diff_hunk":"@@ -0,0 +1,53 @@\n+<?php\n+\n+namespace GuzzleHttp;\n+\n+use Psr\\Http\\Message\\RequestInterface;\n+\n+/**\n+ * Interface for generating HTTP requests.\n+ */\n+interface RequestFactoryInterface\n+{\n+\n+    /**\n+     * Applies any URI options to an existing URI to generate a new one.\n+     *\n+     * @param string $uri\n+     * @param array  $config\n+     *\n+     * @return string\n+     */\n+    public function buildUri($uri, array $config);\n+\n+\n+    /**\n+     * Create a new request.\n+     *\n+     * The $options array is passed by reference so that any\n+     * options that are applied to the request are then removed\n+     * from the array to avoid them being applied twice.\n+     *\n+     * @param string $method\n+     * @param string $uri\n+     * @param array  $options\n+     *\n+     * @return RequestInterface\n+     */\n+    public function make($method, $uri = '', array &$options = []);","path":"src/RequestFactoryInterface.php","position":37,"original_position":37,"commit_id":"35c401f5ffe99235c7d1a94caac76a4f24a5d96f","original_commit_id":"35c401f5ffe99235c7d1a94caac76a4f24a5d96f","user":{"login":"mtdowling","id":190930,"avatar_url":"https://avatars3.githubusercontent.com/u/190930?v=4","gravatar_id":"","url":"https://api.github.com/users/mtdowling","html_url":"https://github.com/mtdowling","followers_url":"https://api.github.com/users/mtdowling/followers","following_url":"https://api.github.com/users/mtdowling/following{/other_user}","gists_url":"https://api.github.com/users/mtdowling/gists{/gist_id}","starred_url":"https://api.github.com/users/mtdowling/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mtdowling/subscriptions","organizations_url":"https://api.github.com/users/mtdowling/orgs","repos_url":"https://api.github.com/users/mtdowling/repos","events_url":"https://api.github.com/users/mtdowling/events{/privacy}","received_events_url":"https://api.github.com/users/mtdowling/received_events","type":"User","site_admin":false},"body":"Passing options by reference will probably lead to subtle bugs and unintended mutation.","created_at":"2017-09-16T20:45:51Z","updated_at":"2017-09-16T20:45:51Z","html_url":"https://github.com/guzzle/guzzle/pull/1914#discussion_r139295031","pull_request_url":"https://api.github.com/repos/guzzle/guzzle/pulls/1914","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/guzzle/guzzle/pulls/comments/139295031"},"html":{"href":"https://github.com/guzzle/guzzle/pull/1914#discussion_r139295031"},"pull_request":{"href":"https://api.github.com/repos/guzzle/guzzle/pulls/1914"}}},"pull_request":{"url":"https://api.github.com/repos/guzzle/guzzle/pulls/1914","id":141086097,"html_url":"https://github.com/guzzle/guzzle/pull/1914","diff_url":"https://github.com/guzzle/guzzle/pull/1914.diff","patch_url":"https://github.com/guzzle/guzzle/pull/1914.patch","issue_url":"https://api.github.com/repos/guzzle/guzzle/issues/1914","number":1914,"state":"open","locked":false,"title":"Create a RequestFactory to generate requests using options arrays","user":{"login":"duncan3dc","id":546811,"avatar_url":"https://avatars2.githubusercontent.com/u/546811?v=4","gravatar_id":"","url":"https://api.github.com/users/duncan3dc","html_url":"https://github.com/duncan3dc","followers_url":"https://api.github.com/users/duncan3dc/followers","following_url":"https://api.github.com/users/duncan3dc/following{/other_user}","gists_url":"https://api.github.com/users/duncan3dc/gists{/gist_id}","starred_url":"https://api.github.com/users/duncan3dc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/duncan3dc/subscriptions","organizations_url":"https://api.github.com/users/duncan3dc/orgs","repos_url":"https://api.github.com/users/duncan3dc/repos","events_url":"https://api.github.com/users/duncan3dc/events{/privacy}","received_events_url":"https://api.github.com/users/duncan3dc/received_events","type":"User","site_admin":false},"body":"I recently wrote some code using `Client::createRequest()` before realising that this is not present in Guzzle 6, I then found #1886 and this pr is an attempt to allow `RequestInterface`s to be generated using array options.\r\n\r\nThe only thing I'm not comfortable with is the reference variable (`$options`) used in `make()`. But I've provided the static method `create()` which provides a version that operates on a copy of `$options`.\r\n\r\nLet me know what you think","created_at":"2017-09-14T14:14:13Z","updated_at":"2017-09-16T20:45:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0856c7b50bf2e9c78d43c258557b85b807055801","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/guzzle/guzzle/pulls/1914/commits","review_comments_url":"https://api.github.com/repos/guzzle/guzzle/pulls/1914/comments","review_comment_url":"https://api.github.com/repos/guzzle/guzzle/pulls/comments{/number}","comments_url":"https://api.github.com/repos/guzzle/guzzle/issues/1914/comments","statuses_url":"https://api.github.com/repos/guzzle/guzzle/statuses/35c401f5ffe99235c7d1a94caac76a4f24a5d96f","head":{"label":"duncan3dc:request-factory","ref":"request-factory","sha":"35c401f5ffe99235c7d1a94caac76a4f24a5d96f","user":{"login":"duncan3dc","id":546811,"avatar_url":"https://avatars2.githubusercontent.com/u/546811?v=4","gravatar_id":"","url":"https://api.github.com/users/duncan3dc","html_url":"https://github.com/duncan3dc","followers_url":"https://api.github.com/users/duncan3dc/followers","following_url":"https://api.github.com/users/duncan3dc/following{/other_user}","gists_url":"https://api.github.com/users/duncan3dc/gists{/gist_id}","starred_url":"https://api.github.com/users/duncan3dc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/duncan3dc/subscriptions","organizations_url":"https://api.github.com/users/duncan3dc/orgs","repos_url":"https://api.github.com/users/duncan3dc/repos","events_url":"https://api.github.com/users/duncan3dc/events{/privacy}","received_events_url":"https://api.github.com/users/duncan3dc/received_events","type":"User","site_admin":false},"repo":{"id":78457565,"name":"guzzle","full_name":"duncan3dc/guzzle","owner":{"login":"duncan3dc","id":546811,"avatar_url":"https://avatars2.githubusercontent.com/u/546811?v=4","gravatar_id":"","url":"https://api.github.com/users/duncan3dc","html_url":"https://github.com/duncan3dc","followers_url":"https://api.github.com/users/duncan3dc/followers","following_url":"https://api.github.com/users/duncan3dc/following{/other_user}","gists_url":"https://api.github.com/users/duncan3dc/gists{/gist_id}","starred_url":"https://api.github.com/users/duncan3dc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/duncan3dc/subscriptions","organizations_url":"https://api.github.com/users/duncan3dc/orgs","repos_url":"https://api.github.com/users/duncan3dc/repos","events_url":"https://api.github.com/users/duncan3dc/events{/privacy}","received_events_url":"https://api.github.com/users/duncan3dc/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/duncan3dc/guzzle","description":"Guzzle, an extensible PHP HTTP client","fork":true,"url":"https://api.github.com/repos/duncan3dc/guzzle","forks_url":"https://api.github.com/repos/duncan3dc/guzzle/forks","keys_url":"https://api.github.com/repos/duncan3dc/guzzle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/duncan3dc/guzzle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/duncan3dc/guzzle/teams","hooks_url":"https://api.github.com/repos/duncan3dc/guzzle/hooks","issue_events_url":"https://api.github.com/repos/duncan3dc/guzzle/issues/events{/number}","events_url":"https://api.github.com/repos/duncan3dc/guzzle/events","assignees_url":"https://api.github.com/repos/duncan3dc/guzzle/assignees{/user}","branches_url":"https://api.github.com/repos/duncan3dc/guzzle/branches{/branch}","tags_url":"https://api.github.com/repos/duncan3dc/guzzle/tags","blobs_url":"https://api.github.com/repos/duncan3dc/guzzle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/duncan3dc/guzzle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/duncan3dc/guzzle/git/refs{/sha}","trees_url":"https://api.github.com/repos/duncan3dc/guzzle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/duncan3dc/guzzle/statuses/{sha}","languages_url":"https://api.github.com/repos/duncan3dc/guzzle/languages","stargazers_url":"https://api.github.com/repos/duncan3dc/guzzle/stargazers","contributors_url":"https://api.github.com/repos/duncan3dc/guzzle/contributors","subscribers_url":"https://api.github.com/repos/duncan3dc/guzzle/subscribers","subscription_url":"https://api.github.com/repos/duncan3dc/guzzle/subscription","commits_url":"https://api.github.com/repos/duncan3dc/guzzle/commits{/sha}","git_commits_url":"https://api.github.com/repos/duncan3dc/guzzle/git/commits{/sha}","comments_url":"https://api.github.com/repos/duncan3dc/guzzle/comments{/number}","issue_comment_url":"https://api.github.com/repos/duncan3dc/guzzle/issues/comments{/number}","contents_url":"https://api.github.com/repos/duncan3dc/guzzle/contents/{+path}","compare_url":"https://api.github.com/repos/duncan3dc/guzzle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/duncan3dc/guzzle/merges","archive_url":"https://api.github.com/repos/duncan3dc/guzzle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/duncan3dc/guzzle/downloads","issues_url":"https://api.github.com/repos/duncan3dc/guzzle/issues{/number}","pulls_url":"https://api.github.com/repos/duncan3dc/guzzle/pulls{/number}","milestones_url":"https://api.github.com/repos/duncan3dc/guzzle/milestones{/number}","notifications_url":"https://api.github.com/repos/duncan3dc/guzzle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/duncan3dc/guzzle/labels{/name}","releases_url":"https://api.github.com/repos/duncan3dc/guzzle/releases{/id}","deployments_url":"https://api.github.com/repos/duncan3dc/guzzle/deployments","created_at":"2017-01-09T18:41:38Z","updated_at":"2017-01-09T18:41:42Z","pushed_at":"2017-09-14T14:11:38Z","git_url":"git://github.com/duncan3dc/guzzle.git","ssh_url":"git@github.com:duncan3dc/guzzle.git","clone_url":"https://github.com/duncan3dc/guzzle.git","svn_url":"https://github.com/duncan3dc/guzzle","homepage":"http://guzzlephp.org/","size":8526,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"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":"guzzle:master","ref":"master","sha":"dfd01d60a38cf7e16b3456d4b1d7c10033b929c0","user":{"login":"guzzle","id":638632,"avatar_url":"https://avatars0.githubusercontent.com/u/638632?v=4","gravatar_id":"","url":"https://api.github.com/users/guzzle","html_url":"https://github.com/guzzle","followers_url":"https://api.github.com/users/guzzle/followers","following_url":"https://api.github.com/users/guzzle/following{/other_user}","gists_url":"https://api.github.com/users/guzzle/gists{/gist_id}","starred_url":"https://api.github.com/users/guzzle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guzzle/subscriptions","organizations_url":"https://api.github.com/users/guzzle/orgs","repos_url":"https://api.github.com/users/guzzle/repos","events_url":"https://api.github.com/users/guzzle/events{/privacy}","received_events_url":"https://api.github.com/users/guzzle/received_events","type":"Organization","site_admin":false},"repo":{"id":1420053,"name":"guzzle","full_name":"guzzle/guzzle","owner":{"login":"guzzle","id":638632,"avatar_url":"https://avatars0.githubusercontent.com/u/638632?v=4","gravatar_id":"","url":"https://api.github.com/users/guzzle","html_url":"https://github.com/guzzle","followers_url":"https://api.github.com/users/guzzle/followers","following_url":"https://api.github.com/users/guzzle/following{/other_user}","gists_url":"https://api.github.com/users/guzzle/gists{/gist_id}","starred_url":"https://api.github.com/users/guzzle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guzzle/subscriptions","organizations_url":"https://api.github.com/users/guzzle/orgs","repos_url":"https://api.github.com/users/guzzle/repos","events_url":"https://api.github.com/users/guzzle/events{/privacy}","received_events_url":"https://api.github.com/users/guzzle/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/guzzle/guzzle","description":"Guzzle, an extensible PHP HTTP client","fork":false,"url":"https://api.github.com/repos/guzzle/guzzle","forks_url":"https://api.github.com/repos/guzzle/guzzle/forks","keys_url":"https://api.github.com/repos/guzzle/guzzle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/guzzle/guzzle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/guzzle/guzzle/teams","hooks_url":"https://api.github.com/repos/guzzle/guzzle/hooks","issue_events_url":"https://api.github.com/repos/guzzle/guzzle/issues/events{/number}","events_url":"https://api.github.com/repos/guzzle/guzzle/events","assignees_url":"https://api.github.com/repos/guzzle/guzzle/assignees{/user}","branches_url":"https://api.github.com/repos/guzzle/guzzle/branches{/branch}","tags_url":"https://api.github.com/repos/guzzle/guzzle/tags","blobs_url":"https://api.github.com/repos/guzzle/guzzle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/guzzle/guzzle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/guzzle/guzzle/git/refs{/sha}","trees_url":"https://api.github.com/repos/guzzle/guzzle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/guzzle/guzzle/statuses/{sha}","languages_url":"https://api.github.com/repos/guzzle/guzzle/languages","stargazers_url":"https://api.github.com/repos/guzzle/guzzle/stargazers","contributors_url":"https://api.github.com/repos/guzzle/guzzle/contributors","subscribers_url":"https://api.github.com/repos/guzzle/guzzle/subscribers","subscription_url":"https://api.github.com/repos/guzzle/guzzle/subscription","commits_url":"https://api.github.com/repos/guzzle/guzzle/commits{/sha}","git_commits_url":"https://api.github.com/repos/guzzle/guzzle/git/commits{/sha}","comments_url":"https://api.github.com/repos/guzzle/guzzle/comments{/number}","issue_comment_url":"https://api.github.com/repos/guzzle/guzzle/issues/comments{/number}","contents_url":"https://api.github.com/repos/guzzle/guzzle/contents/{+path}","compare_url":"https://api.github.com/repos/guzzle/guzzle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/guzzle/guzzle/merges","archive_url":"https://api.github.com/repos/guzzle/guzzle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/guzzle/guzzle/downloads","issues_url":"https://api.github.com/repos/guzzle/guzzle/issues{/number}","pulls_url":"https://api.github.com/repos/guzzle/guzzle/pulls{/number}","milestones_url":"https://api.github.com/repos/guzzle/guzzle/milestones{/number}","notifications_url":"https://api.github.com/repos/guzzle/guzzle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/guzzle/guzzle/labels{/name}","releases_url":"https://api.github.com/repos/guzzle/guzzle/releases{/id}","deployments_url":"https://api.github.com/repos/guzzle/guzzle/deployments","created_at":"2011-02-28T02:44:05Z","updated_at":"2017-09-16T15:46:06Z","pushed_at":"2017-09-15T13:34:05Z","git_url":"git://github.com/guzzle/guzzle.git","ssh_url":"git@github.com:guzzle/guzzle.git","clone_url":"https://github.com/guzzle/guzzle.git","svn_url":"https://github.com/guzzle/guzzle","homepage":"http://guzzlephp.org/","size":8527,"stargazers_count":9882,"watchers_count":9882,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1513,"mirror_url":null,"open_issues_count":158,"forks":1513,"open_issues":158,"watchers":9882,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/guzzle/guzzle/pulls/1914"},"html":{"href":"https://github.com/guzzle/guzzle/pull/1914"},"issue":{"href":"https://api.github.com/repos/guzzle/guzzle/issues/1914"},"comments":{"href":"https://api.github.com/repos/guzzle/guzzle/issues/1914/comments"},"review_comments":{"href":"https://api.github.com/repos/guzzle/guzzle/pulls/1914/comments"},"review_comment":{"href":"https://api.github.com/repos/guzzle/guzzle/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/guzzle/guzzle/pulls/1914/commits"},"statuses":{"href":"https://api.github.com/repos/guzzle/guzzle/statuses/35c401f5ffe99235c7d1a94caac76a4f24a5d96f"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"mtdowling"}}