{"action":"created","comment":{"url":"https://api.github.com/repos/mongodb/mongo-hhvm-driver/pulls/comments/74733394","id":74733394,"diff_hunk":"@@ -0,0 +1,48 @@\n+--TEST--\n+MongoDB\\BSON\\Binary::__set_state()\n+--FILE--\n+<?php\n+$tests = [\n+    ['foobar', MongoDB\\BSON\\Binary::TYPE_GENERIC],\n+    ['', MongoDB\\BSON\\Binary::TYPE_GENERIC],\n+    [\"\\0foo\", MongoDB\\BSON\\Binary::TYPE_GENERIC],\n+    [hex2bin('123e4567e89b12d3a456426655440000'), MongoDB\\BSON\\Binary::TYPE_UUID],\n+    [md5('foobar', true), MongoDB\\BSON\\Binary::TYPE_MD5],\n+];\n+\n+foreach ($tests as $test) {\n+    list($data, $type) = $test;\n+\n+    var_export(MongoDB\\BSON\\Binary::__set_state([\n+        'data' => $data,\n+        'type' => $type,\n+    ]));\n+    echo \"\\n\\n\";\n+}\n+\n+?>\n+--EXPECT--\n+MongoDB\\BSON\\Binary::__set_state(array(\n+  'data' => 'foobar',\n+  'type' => 0,\n+))\n+\n+MongoDB\\BSON\\Binary::__set_state(array(\n+  'data' => '',\n+  'type' => 0,\n+))\n+\n+MongoDB\\BSON\\Binary::__set_state(array(\n+  'data' => '' . \"\\0\" . 'foo',\n+  'type' => 0,\n+))\n+\n+MongoDB\\BSON\\Binary::__set_state(array(\n+  'data' => '\u0012>Eg�\u0012ӤVBfUD' . \"\\0\" . '' . \"\\0\" . '',","path":"tests/MongoDBBSONBinary_set_state-001.phpt","position":null,"original_position":41,"commit_id":"ac68c3faf1ab214b909ab188084db1bb38739ee9","original_commit_id":"ac68c3faf1ab214b909ab188084db1bb38739ee9","user":{"login":"jmikola","id":244663,"avatar_url":"https://avatars.githubusercontent.com/u/244663?v=3","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":"I propose we just change the binary data `%a` across the board, as including the raw binary in the PHPT files has issues for both of our editors.","created_at":"2016-08-15T08:37:01Z","updated_at":"2016-08-15T08:37:01Z","html_url":"https://github.com/mongodb/mongo-hhvm-driver/pull/120#discussion_r74733394","pull_request_url":"https://api.github.com/repos/mongodb/mongo-hhvm-driver/pulls/120","_links":{"self":{"href":"https://api.github.com/repos/mongodb/mongo-hhvm-driver/pulls/comments/74733394"},"html":{"href":"https://github.com/mongodb/mongo-hhvm-driver/pull/120#discussion_r74733394"},"pull_request":{"href":"https://api.github.com/repos/mongodb/mongo-hhvm-driver/pulls/120"}}},"pull_request":{"url":"https://api.github.com/repos/mongodb/mongo-hhvm-driver/pulls/120","id":80810312,"html_url":"https://github.com/mongodb/mongo-hhvm-driver/pull/120","diff_url":"https://github.com/mongodb/mongo-hhvm-driver/pull/120.diff","patch_url":"https://github.com/mongodb/mongo-hhvm-driver/pull/120.patch","issue_url":"https://api.github.com/repos/mongodb/mongo-hhvm-driver/issues/120","number":120,"state":"open","locked":false,"title":"HHVM-130: BSON classes should support PHP serialization and var_export()","user":{"login":"derickr","id":208074,"avatar_url":"https://avatars.githubusercontent.com/u/208074?v=3","gravatar_id":"","url":"https://api.github.com/users/derickr","html_url":"https://github.com/derickr","followers_url":"https://api.github.com/users/derickr/followers","following_url":"https://api.github.com/users/derickr/following{/other_user}","gists_url":"https://api.github.com/users/derickr/gists{/gist_id}","starred_url":"https://api.github.com/users/derickr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/derickr/subscriptions","organizations_url":"https://api.github.com/users/derickr/orgs","repos_url":"https://api.github.com/users/derickr/repos","events_url":"https://api.github.com/users/derickr/events{/privacy}","received_events_url":"https://api.github.com/users/derickr/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-08-10T15:02:20Z","updated_at":"2016-08-15T08:37:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2a55703630a0001cdf484649eb6a51e45f820c6c","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/mongodb/mongo-hhvm-driver/pulls/120/commits","review_comments_url":"https://api.github.com/repos/mongodb/mongo-hhvm-driver/pulls/120/comments","review_comment_url":"https://api.github.com/repos/mongodb/mongo-hhvm-driver/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mongodb/mongo-hhvm-driver/issues/120/comments","statuses_url":"https://api.github.com/repos/mongodb/mongo-hhvm-driver/statuses/ac68c3faf1ab214b909ab188084db1bb38739ee9","head":{"label":"derickr:HHVM-130-serialization","ref":"HHVM-130-serialization","sha":"ac68c3faf1ab214b909ab188084db1bb38739ee9","user":{"login":"derickr","id":208074,"avatar_url":"https://avatars.githubusercontent.com/u/208074?v=3","gravatar_id":"","url":"https://api.github.com/users/derickr","html_url":"https://github.com/derickr","followers_url":"https://api.github.com/users/derickr/followers","following_url":"https://api.github.com/users/derickr/following{/other_user}","gists_url":"https://api.github.com/users/derickr/gists{/gist_id}","starred_url":"https://api.github.com/users/derickr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/derickr/subscriptions","organizations_url":"https://api.github.com/users/derickr/orgs","repos_url":"https://api.github.com/users/derickr/repos","events_url":"https://api.github.com/users/derickr/events{/privacy}","received_events_url":"https://api.github.com/users/derickr/received_events","type":"User","site_admin":false},"repo":{"id":46001995,"name":"mongo-hhvm-driver","full_name":"derickr/mongo-hhvm-driver","owner":{"login":"derickr","id":208074,"avatar_url":"https://avatars.githubusercontent.com/u/208074?v=3","gravatar_id":"","url":"https://api.github.com/users/derickr","html_url":"https://github.com/derickr","followers_url":"https://api.github.com/users/derickr/followers","following_url":"https://api.github.com/users/derickr/following{/other_user}","gists_url":"https://api.github.com/users/derickr/gists{/gist_id}","starred_url":"https://api.github.com/users/derickr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/derickr/subscriptions","organizations_url":"https://api.github.com/users/derickr/orgs","repos_url":"https://api.github.com/users/derickr/repos","events_url":"https://api.github.com/users/derickr/events{/privacy}","received_events_url":"https://api.github.com/users/derickr/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/derickr/mongo-hhvm-driver","description":"MongoDB HHVM driver (experimental)","fork":true,"url":"https://api.github.com/repos/derickr/mongo-hhvm-driver","forks_url":"https://api.github.com/repos/derickr/mongo-hhvm-driver/forks","keys_url":"https://api.github.com/repos/derickr/mongo-hhvm-driver/keys{/key_id}","collaborators_url":"https://api.github.com/repos/derickr/mongo-hhvm-driver/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/derickr/mongo-hhvm-driver/teams","hooks_url":"https://api.github.com/repos/derickr/mongo-hhvm-driver/hooks","issue_events_url":"https://api.github.com/repos/derickr/mongo-hhvm-driver/issues/events{/number}","events_url":"https://api.github.com/repos/derickr/mongo-hhvm-driver/events","assignees_url":"https://api.github.com/repos/derickr/mongo-hhvm-driver/assignees{/user}","branches_url":"https://api.github.com/repos/derickr/mongo-hhvm-driver/branches{/branch}","tags_url":"https://api.github.com/repos/derickr/mongo-hhvm-driver/tags","blobs_url":"https://api.github.com/repos/derickr/mongo-hhvm-driver/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/derickr/mongo-hhvm-driver/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/derickr/mongo-hhvm-driver/git/refs{/sha}","trees_url":"https://api.github.com/repos/derickr/mongo-hhvm-driver/git/trees{/sha}","statuses_url":"https://api.github.com/repos/derickr/mongo-hhvm-driver/statuses/{sha}","languages_url":"https://api.github.com/repos/derickr/mongo-hhvm-driver/languages","stargazers_url":"https://api.github.com/repos/derickr/mongo-hhvm-driver/stargazers","contributors_url":"https://api.github.com/repos/derickr/mongo-hhvm-driver/contributors","subscribers_url":"https://api.github.com/repos/derickr/mongo-hhvm-driver/subscribers","subscription_url":"https://api.github.com/repos/derickr/mongo-hhvm-driver/subscription","commits_url":"https://api.github.com/repos/derickr/mongo-hhvm-driver/commits{/sha}","git_commits_url":"https://api.github.com/repos/derickr/mongo-hhvm-driver/git/commits{/sha}","comments_url":"https://api.github.com/repos/derickr/mongo-hhvm-driver/comments{/number}","issue_comment_url":"https://api.github.com/repos/derickr/mongo-hhvm-driver/issues/comments{/number}","contents_url":"https://api.github.com/repos/derickr/mongo-hhvm-driver/contents/{+path}","compare_url":"https://api.github.com/repos/derickr/mongo-hhvm-driver/compare/{base}...{head}","merges_url":"https://api.github.com/repos/derickr/mongo-hhvm-driver/merges","archive_url":"https://api.github.com/repos/derickr/mongo-hhvm-driver/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/derickr/mongo-hhvm-driver/downloads","issues_url":"https://api.github.com/repos/derickr/mongo-hhvm-driver/issues{/number}","pulls_url":"https://api.github.com/repos/derickr/mongo-hhvm-driver/pulls{/number}","milestones_url":"https://api.github.com/repos/derickr/mongo-hhvm-driver/milestones{/number}","notifications_url":"https://api.github.com/repos/derickr/mongo-hhvm-driver/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/derickr/mongo-hhvm-driver/labels{/name}","releases_url":"https://api.github.com/repos/derickr/mongo-hhvm-driver/releases{/id}","deployments_url":"https://api.github.com/repos/derickr/mongo-hhvm-driver/deployments","created_at":"2015-11-11T18:41:53Z","updated_at":"2016-04-28T09:16:09Z","pushed_at":"2016-08-10T15:00:42Z","git_url":"git://github.com/derickr/mongo-hhvm-driver.git","ssh_url":"git@github.com:derickr/mongo-hhvm-driver.git","clone_url":"https://github.com/derickr/mongo-hhvm-driver.git","svn_url":"https://github.com/derickr/mongo-hhvm-driver","homepage":"","size":6853,"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":"mongodb:v1.2","ref":"v1.2","sha":"1a0f86f28ab24d8981368df0088738a0e333d4ec","user":{"login":"mongodb","id":45120,"avatar_url":"https://avatars.githubusercontent.com/u/45120?v=3","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":27442261,"name":"mongo-hhvm-driver","full_name":"mongodb/mongo-hhvm-driver","owner":{"login":"mongodb","id":45120,"avatar_url":"https://avatars.githubusercontent.com/u/45120?v=3","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-hhvm-driver","description":"MongoDB HHVM driver","fork":false,"url":"https://api.github.com/repos/mongodb/mongo-hhvm-driver","forks_url":"https://api.github.com/repos/mongodb/mongo-hhvm-driver/forks","keys_url":"https://api.github.com/repos/mongodb/mongo-hhvm-driver/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mongodb/mongo-hhvm-driver/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mongodb/mongo-hhvm-driver/teams","hooks_url":"https://api.github.com/repos/mongodb/mongo-hhvm-driver/hooks","issue_events_url":"https://api.github.com/repos/mongodb/mongo-hhvm-driver/issues/events{/number}","events_url":"https://api.github.com/repos/mongodb/mongo-hhvm-driver/events","assignees_url":"https://api.github.com/repos/mongodb/mongo-hhvm-driver/assignees{/user}","branches_url":"https://api.github.com/repos/mongodb/mongo-hhvm-driver/branches{/branch}","tags_url":"https://api.github.com/repos/mongodb/mongo-hhvm-driver/tags","blobs_url":"https://api.github.com/repos/mongodb/mongo-hhvm-driver/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mongodb/mongo-hhvm-driver/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mongodb/mongo-hhvm-driver/git/refs{/sha}","trees_url":"https://api.github.com/repos/mongodb/mongo-hhvm-driver/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mongodb/mongo-hhvm-driver/statuses/{sha}","languages_url":"https://api.github.com/repos/mongodb/mongo-hhvm-driver/languages","stargazers_url":"https://api.github.com/repos/mongodb/mongo-hhvm-driver/stargazers","contributors_url":"https://api.github.com/repos/mongodb/mongo-hhvm-driver/contributors","subscribers_url":"https://api.github.com/repos/mongodb/mongo-hhvm-driver/subscribers","subscription_url":"https://api.github.com/repos/mongodb/mongo-hhvm-driver/subscription","commits_url":"https://api.github.com/repos/mongodb/mongo-hhvm-driver/commits{/sha}","git_commits_url":"https://api.github.com/repos/mongodb/mongo-hhvm-driver/git/commits{/sha}","comments_url":"https://api.github.com/repos/mongodb/mongo-hhvm-driver/comments{/number}","issue_comment_url":"https://api.github.com/repos/mongodb/mongo-hhvm-driver/issues/comments{/number}","contents_url":"https://api.github.com/repos/mongodb/mongo-hhvm-driver/contents/{+path}","compare_url":"https://api.github.com/repos/mongodb/mongo-hhvm-driver/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mongodb/mongo-hhvm-driver/merges","archive_url":"https://api.github.com/repos/mongodb/mongo-hhvm-driver/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mongodb/mongo-hhvm-driver/downloads","issues_url":"https://api.github.com/repos/mongodb/mongo-hhvm-driver/issues{/number}","pulls_url":"https://api.github.com/repos/mongodb/mongo-hhvm-driver/pulls{/number}","milestones_url":"https://api.github.com/repos/mongodb/mongo-hhvm-driver/milestones{/number}","notifications_url":"https://api.github.com/repos/mongodb/mongo-hhvm-driver/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mongodb/mongo-hhvm-driver/labels{/name}","releases_url":"https://api.github.com/repos/mongodb/mongo-hhvm-driver/releases{/id}","deployments_url":"https://api.github.com/repos/mongodb/mongo-hhvm-driver/deployments","created_at":"2014-12-02T16:44:52Z","updated_at":"2016-07-28T15:53:49Z","pushed_at":"2016-08-10T15:02:20Z","git_url":"git://github.com/mongodb/mongo-hhvm-driver.git","ssh_url":"git@github.com:mongodb/mongo-hhvm-driver.git","clone_url":"https://github.com/mongodb/mongo-hhvm-driver.git","svn_url":"https://github.com/mongodb/mongo-hhvm-driver","homepage":"","size":6856,"stargazers_count":26,"watchers_count":26,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":8,"forks":7,"open_issues":8,"watchers":26,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mongodb/mongo-hhvm-driver/pulls/120"},"html":{"href":"https://github.com/mongodb/mongo-hhvm-driver/pull/120"},"issue":{"href":"https://api.github.com/repos/mongodb/mongo-hhvm-driver/issues/120"},"comments":{"href":"https://api.github.com/repos/mongodb/mongo-hhvm-driver/issues/120/comments"},"review_comments":{"href":"https://api.github.com/repos/mongodb/mongo-hhvm-driver/pulls/120/comments"},"review_comment":{"href":"https://api.github.com/repos/mongodb/mongo-hhvm-driver/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mongodb/mongo-hhvm-driver/pulls/120/commits"},"statuses":{"href":"https://api.github.com/repos/mongodb/mongo-hhvm-driver/statuses/ac68c3faf1ab214b909ab188084db1bb38739ee9"}}}}
{"actor":{"display_login":"jmikola"}}