{"action":"created","comment":{"url":"https://api.github.com/repos/mongodb/mongo-php-library/pulls/comments/175203080","pull_request_review_id":104686161,"id":175203080,"diff_hunk":"@@ -0,0 +1,146 @@\n+<?php\n+/*\n+ * Copyright 2018 MongoDB, Inc.\n+ *\n+ * Licensed under the Apache License, Version 2.0 (the \"License\");\n+ * you may not use this file except in compliance with the License.\n+ * You may obtain a copy of the License at\n+ *\n+ *   http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS,\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ */\n+\n+namespace MongoDB\\Operation;\n+\n+use MongoDB\\Driver\\Command;\n+use MongoDB\\Driver\\Server;\n+use MongoDB\\Driver\\Session;\n+use MongoDB\\Driver\\WriteConcern;\n+use MongoDB\\Driver\\Exception\\RuntimeException as DriverRuntimeException;\n+use MongoDB\\Exception\\InvalidArgumentException;\n+\n+/**\n+ * Operation for the collMod command.\n+ *\n+ * @api\n+ * @see \\MongoDB\\Database::modifyCollection()\n+ * @see http://docs.mongodb.org/manual/reference/command/collMod/\n+ */\n+class ModifyCollection implements Executable\n+{\n+    private $databaseName;\n+    private $collectionName;\n+    private $collModOption;\n+    private $collModValue;\n+    private $options;\n+\n+    /**\n+     * Constructs a collMod command.\n+     *\n+     * Supported options:\n+     *\n+     *  * session (MongoDB\\Driver\\Session): Client session.\n+     *\n+     *    Sessions are not supported for server versions < 3.6.\n+     *\n+     *  * typeMap (array): Type map for BSON deserialization. This will only be\n+     *    used for the returned command result document.\n+     *\n+     *  * writeConcern (MongoDB\\Driver\\WriteConcern): Write concern.\n+     *\n+     *    This is not supported for server versions < 3.2 and will result in an\n+     *    exception at execution time if used.\n+     *\n+     * @param string       $databaseName       Database name\n+     * @param string       $collectionOrView   Collection or view to modify\n+     * @param string       $collModOptionValue Options and values for collMod\n+     * @param array        $options            Command options\n+     * @throws InvalidArgumentException for parameter/option parsing errors\n+     */\n+    public function __construct($databaseName, $collectionOrView, $collModOptionValue, array $options = [])\n+    {\n+        if (isset($options['session']) && ! $options['session'] instanceof Session) {\n+            throw InvalidArgumentException::invalidType('\"session\" option', $options['session'], 'MongoDB\\Driver\\Session');\n+        }\n+\n+        if (isset($options['typeMap']) && ! is_array($options['typeMap'])) {\n+            throw InvalidArgumentException::invalidType('\"typeMap\" option', $options['typeMap'], 'array');\n+        }\n+\n+        if (isset($options['writeConcern']) && ! $options['writeConcern'] instanceof WriteConcern) {\n+            throw InvalidArgumentException::invalidType('\"writeConcern\" option', $options['writeConcern'], 'MongoDB\\Driver\\WriteConcern');\n+        }\n+\n+        if (isset($options['writeConcern']) && $options['writeConcern']->isDefault()) {\n+            unset($options['writeConcern']);\n+        }\n+\n+        $this->databaseName = (string) $databaseName;\n+        $this->collectionOrView = (string) $collectionOrView;","path":"src/Operation/ModifyCollection.php","position":84,"original_position":84,"commit_id":"b4fb5616692fec911e6888d6d804b8804704e179","original_commit_id":"b4fb5616692fec911e6888d6d804b8804704e179","user":{"login":"jmikola","id":244663,"avatar_url":"https://avatars3.githubusercontent.com/u/244663?v=4","gravatar_id":"","url":"https://api.github.com/users/jmikola","html_url":"https://github.com/jmikola","followers_url":"https://api.github.com/users/jmikola/followers","following_url":"https://api.github.com/users/jmikola/following{/other_user}","gists_url":"https://api.github.com/users/jmikola/gists{/gist_id}","starred_url":"https://api.github.com/users/jmikola/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmikola/subscriptions","organizations_url":"https://api.github.com/users/jmikola/orgs","repos_url":"https://api.github.com/users/jmikola/repos","events_url":"https://api.github.com/users/jmikola/events{/privacy}","received_events_url":"https://api.github.com/users/jmikola/received_events","type":"User","site_admin":false},"body":"The property name defined above is `private $collectionName`. Let's use that here, too.","created_at":"2018-03-16T20:14:56Z","updated_at":"2018-03-16T20:39:18Z","html_url":"https://github.com/mongodb/mongo-php-library/pull/513#discussion_r175203080","pull_request_url":"https://api.github.com/repos/mongodb/mongo-php-library/pulls/513","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/mongodb/mongo-php-library/pulls/comments/175203080"},"html":{"href":"https://github.com/mongodb/mongo-php-library/pull/513#discussion_r175203080"},"pull_request":{"href":"https://api.github.com/repos/mongodb/mongo-php-library/pulls/513"}}},"pull_request":{"url":"https://api.github.com/repos/mongodb/mongo-php-library/pulls/513","id":175265879,"html_url":"https://github.com/mongodb/mongo-php-library/pull/513","diff_url":"https://github.com/mongodb/mongo-php-library/pull/513.diff","patch_url":"https://github.com/mongodb/mongo-php-library/pull/513.patch","issue_url":"https://api.github.com/repos/mongodb/mongo-php-library/issues/513","number":513,"state":"open","locked":false,"title":"PHPLIB-66: Wrapper method for collMod command","user":{"login":"kvwalker","id":7121013,"avatar_url":"https://avatars3.githubusercontent.com/u/7121013?v=4","gravatar_id":"","url":"https://api.github.com/users/kvwalker","html_url":"https://github.com/kvwalker","followers_url":"https://api.github.com/users/kvwalker/followers","following_url":"https://api.github.com/users/kvwalker/following{/other_user}","gists_url":"https://api.github.com/users/kvwalker/gists{/gist_id}","starred_url":"https://api.github.com/users/kvwalker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kvwalker/subscriptions","organizations_url":"https://api.github.com/users/kvwalker/orgs","repos_url":"https://api.github.com/users/kvwalker/repos","events_url":"https://api.github.com/users/kvwalker/events{/privacy}","received_events_url":"https://api.github.com/users/kvwalker/received_events","type":"User","site_admin":false},"body":"https://jira.mongodb.org/browse/PHPLIB-66","created_at":"2018-03-15T14:22:21Z","updated_at":"2018-03-16T20:39:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"eda80845bcdc09ff956c0272a9ffde4e733f5803","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/mongodb/mongo-php-library/pulls/513/commits","review_comments_url":"https://api.github.com/repos/mongodb/mongo-php-library/pulls/513/comments","review_comment_url":"https://api.github.com/repos/mongodb/mongo-php-library/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mongodb/mongo-php-library/issues/513/comments","statuses_url":"https://api.github.com/repos/mongodb/mongo-php-library/statuses/b4fb5616692fec911e6888d6d804b8804704e179","head":{"label":"kvwalker:PHPLIB-66","ref":"PHPLIB-66","sha":"b4fb5616692fec911e6888d6d804b8804704e179","user":{"login":"kvwalker","id":7121013,"avatar_url":"https://avatars3.githubusercontent.com/u/7121013?v=4","gravatar_id":"","url":"https://api.github.com/users/kvwalker","html_url":"https://github.com/kvwalker","followers_url":"https://api.github.com/users/kvwalker/followers","following_url":"https://api.github.com/users/kvwalker/following{/other_user}","gists_url":"https://api.github.com/users/kvwalker/gists{/gist_id}","starred_url":"https://api.github.com/users/kvwalker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kvwalker/subscriptions","organizations_url":"https://api.github.com/users/kvwalker/orgs","repos_url":"https://api.github.com/users/kvwalker/repos","events_url":"https://api.github.com/users/kvwalker/events{/privacy}","received_events_url":"https://api.github.com/users/kvwalker/received_events","type":"User","site_admin":false},"repo":{"id":107586508,"name":"mongo-php-library","full_name":"kvwalker/mongo-php-library","owner":{"login":"kvwalker","id":7121013,"avatar_url":"https://avatars3.githubusercontent.com/u/7121013?v=4","gravatar_id":"","url":"https://api.github.com/users/kvwalker","html_url":"https://github.com/kvwalker","followers_url":"https://api.github.com/users/kvwalker/followers","following_url":"https://api.github.com/users/kvwalker/following{/other_user}","gists_url":"https://api.github.com/users/kvwalker/gists{/gist_id}","starred_url":"https://api.github.com/users/kvwalker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kvwalker/subscriptions","organizations_url":"https://api.github.com/users/kvwalker/orgs","repos_url":"https://api.github.com/users/kvwalker/repos","events_url":"https://api.github.com/users/kvwalker/events{/privacy}","received_events_url":"https://api.github.com/users/kvwalker/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kvwalker/mongo-php-library","description":"MongoDB PHP library","fork":true,"url":"https://api.github.com/repos/kvwalker/mongo-php-library","forks_url":"https://api.github.com/repos/kvwalker/mongo-php-library/forks","keys_url":"https://api.github.com/repos/kvwalker/mongo-php-library/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kvwalker/mongo-php-library/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kvwalker/mongo-php-library/teams","hooks_url":"https://api.github.com/repos/kvwalker/mongo-php-library/hooks","issue_events_url":"https://api.github.com/repos/kvwalker/mongo-php-library/issues/events{/number}","events_url":"https://api.github.com/repos/kvwalker/mongo-php-library/events","assignees_url":"https://api.github.com/repos/kvwalker/mongo-php-library/assignees{/user}","branches_url":"https://api.github.com/repos/kvwalker/mongo-php-library/branches{/branch}","tags_url":"https://api.github.com/repos/kvwalker/mongo-php-library/tags","blobs_url":"https://api.github.com/repos/kvwalker/mongo-php-library/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kvwalker/mongo-php-library/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kvwalker/mongo-php-library/git/refs{/sha}","trees_url":"https://api.github.com/repos/kvwalker/mongo-php-library/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kvwalker/mongo-php-library/statuses/{sha}","languages_url":"https://api.github.com/repos/kvwalker/mongo-php-library/languages","stargazers_url":"https://api.github.com/repos/kvwalker/mongo-php-library/stargazers","contributors_url":"https://api.github.com/repos/kvwalker/mongo-php-library/contributors","subscribers_url":"https://api.github.com/repos/kvwalker/mongo-php-library/subscribers","subscription_url":"https://api.github.com/repos/kvwalker/mongo-php-library/subscription","commits_url":"https://api.github.com/repos/kvwalker/mongo-php-library/commits{/sha}","git_commits_url":"https://api.github.com/repos/kvwalker/mongo-php-library/git/commits{/sha}","comments_url":"https://api.github.com/repos/kvwalker/mongo-php-library/comments{/number}","issue_comment_url":"https://api.github.com/repos/kvwalker/mongo-php-library/issues/comments{/number}","contents_url":"https://api.github.com/repos/kvwalker/mongo-php-library/contents/{+path}","compare_url":"https://api.github.com/repos/kvwalker/mongo-php-library/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kvwalker/mongo-php-library/merges","archive_url":"https://api.github.com/repos/kvwalker/mongo-php-library/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kvwalker/mongo-php-library/downloads","issues_url":"https://api.github.com/repos/kvwalker/mongo-php-library/issues{/number}","pulls_url":"https://api.github.com/repos/kvwalker/mongo-php-library/pulls{/number}","milestones_url":"https://api.github.com/repos/kvwalker/mongo-php-library/milestones{/number}","notifications_url":"https://api.github.com/repos/kvwalker/mongo-php-library/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kvwalker/mongo-php-library/labels{/name}","releases_url":"https://api.github.com/repos/kvwalker/mongo-php-library/releases{/id}","deployments_url":"https://api.github.com/repos/kvwalker/mongo-php-library/deployments","created_at":"2017-10-19T18:58:56Z","updated_at":"2018-03-13T18:50:35Z","pushed_at":"2018-03-16T15:45:01Z","git_url":"git://github.com/kvwalker/mongo-php-library.git","ssh_url":"git@github.com:kvwalker/mongo-php-library.git","clone_url":"https://github.com/kvwalker/mongo-php-library.git","svn_url":"https://github.com/kvwalker/mongo-php-library","homepage":"https://docs.mongodb.com/php-library/","size":1703,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mongodb:master","ref":"master","sha":"c662aa19a314f68f3332f7d7e7dfd5b98693ad64","user":{"login":"mongodb","id":45120,"avatar_url":"https://avatars1.githubusercontent.com/u/45120?v=4","gravatar_id":"","url":"https://api.github.com/users/mongodb","html_url":"https://github.com/mongodb","followers_url":"https://api.github.com/users/mongodb/followers","following_url":"https://api.github.com/users/mongodb/following{/other_user}","gists_url":"https://api.github.com/users/mongodb/gists{/gist_id}","starred_url":"https://api.github.com/users/mongodb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mongodb/subscriptions","organizations_url":"https://api.github.com/users/mongodb/orgs","repos_url":"https://api.github.com/users/mongodb/repos","events_url":"https://api.github.com/users/mongodb/events{/privacy}","received_events_url":"https://api.github.com/users/mongodb/received_events","type":"Organization","site_admin":false},"repo":{"id":27557391,"name":"mongo-php-library","full_name":"mongodb/mongo-php-library","owner":{"login":"mongodb","id":45120,"avatar_url":"https://avatars1.githubusercontent.com/u/45120?v=4","gravatar_id":"","url":"https://api.github.com/users/mongodb","html_url":"https://github.com/mongodb","followers_url":"https://api.github.com/users/mongodb/followers","following_url":"https://api.github.com/users/mongodb/following{/other_user}","gists_url":"https://api.github.com/users/mongodb/gists{/gist_id}","starred_url":"https://api.github.com/users/mongodb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mongodb/subscriptions","organizations_url":"https://api.github.com/users/mongodb/orgs","repos_url":"https://api.github.com/users/mongodb/repos","events_url":"https://api.github.com/users/mongodb/events{/privacy}","received_events_url":"https://api.github.com/users/mongodb/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mongodb/mongo-php-library","description":"MongoDB PHP library","fork":false,"url":"https://api.github.com/repos/mongodb/mongo-php-library","forks_url":"https://api.github.com/repos/mongodb/mongo-php-library/forks","keys_url":"https://api.github.com/repos/mongodb/mongo-php-library/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mongodb/mongo-php-library/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mongodb/mongo-php-library/teams","hooks_url":"https://api.github.com/repos/mongodb/mongo-php-library/hooks","issue_events_url":"https://api.github.com/repos/mongodb/mongo-php-library/issues/events{/number}","events_url":"https://api.github.com/repos/mongodb/mongo-php-library/events","assignees_url":"https://api.github.com/repos/mongodb/mongo-php-library/assignees{/user}","branches_url":"https://api.github.com/repos/mongodb/mongo-php-library/branches{/branch}","tags_url":"https://api.github.com/repos/mongodb/mongo-php-library/tags","blobs_url":"https://api.github.com/repos/mongodb/mongo-php-library/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mongodb/mongo-php-library/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mongodb/mongo-php-library/git/refs{/sha}","trees_url":"https://api.github.com/repos/mongodb/mongo-php-library/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mongodb/mongo-php-library/statuses/{sha}","languages_url":"https://api.github.com/repos/mongodb/mongo-php-library/languages","stargazers_url":"https://api.github.com/repos/mongodb/mongo-php-library/stargazers","contributors_url":"https://api.github.com/repos/mongodb/mongo-php-library/contributors","subscribers_url":"https://api.github.com/repos/mongodb/mongo-php-library/subscribers","subscription_url":"https://api.github.com/repos/mongodb/mongo-php-library/subscription","commits_url":"https://api.github.com/repos/mongodb/mongo-php-library/commits{/sha}","git_commits_url":"https://api.github.com/repos/mongodb/mongo-php-library/git/commits{/sha}","comments_url":"https://api.github.com/repos/mongodb/mongo-php-library/comments{/number}","issue_comment_url":"https://api.github.com/repos/mongodb/mongo-php-library/issues/comments{/number}","contents_url":"https://api.github.com/repos/mongodb/mongo-php-library/contents/{+path}","compare_url":"https://api.github.com/repos/mongodb/mongo-php-library/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mongodb/mongo-php-library/merges","archive_url":"https://api.github.com/repos/mongodb/mongo-php-library/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mongodb/mongo-php-library/downloads","issues_url":"https://api.github.com/repos/mongodb/mongo-php-library/issues{/number}","pulls_url":"https://api.github.com/repos/mongodb/mongo-php-library/pulls{/number}","milestones_url":"https://api.github.com/repos/mongodb/mongo-php-library/milestones{/number}","notifications_url":"https://api.github.com/repos/mongodb/mongo-php-library/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mongodb/mongo-php-library/labels{/name}","releases_url":"https://api.github.com/repos/mongodb/mongo-php-library/releases{/id}","deployments_url":"https://api.github.com/repos/mongodb/mongo-php-library/deployments","created_at":"2014-12-04T19:55:40Z","updated_at":"2018-03-16T13:10:33Z","pushed_at":"2018-03-16T15:45:02Z","git_url":"git://github.com/mongodb/mongo-php-library.git","ssh_url":"git@github.com:mongodb/mongo-php-library.git","clone_url":"https://github.com/mongodb/mongo-php-library.git","svn_url":"https://github.com/mongodb/mongo-php-library","homepage":"https://docs.mongodb.com/php-library/","size":1679,"stargazers_count":674,"watchers_count":674,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":169,"mirror_url":null,"archived":false,"open_issues_count":12,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":169,"open_issues":12,"watchers":674,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mongodb/mongo-php-library/pulls/513"},"html":{"href":"https://github.com/mongodb/mongo-php-library/pull/513"},"issue":{"href":"https://api.github.com/repos/mongodb/mongo-php-library/issues/513"},"comments":{"href":"https://api.github.com/repos/mongodb/mongo-php-library/issues/513/comments"},"review_comments":{"href":"https://api.github.com/repos/mongodb/mongo-php-library/pulls/513/comments"},"review_comment":{"href":"https://api.github.com/repos/mongodb/mongo-php-library/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mongodb/mongo-php-library/pulls/513/commits"},"statuses":{"href":"https://api.github.com/repos/mongodb/mongo-php-library/statuses/b4fb5616692fec911e6888d6d804b8804704e179"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"jmikola"}}