{"action":"closed","number":22,"pull_request":{"url":"https://api.github.com/repos/centraldesktop/Protobuf-PHP/pulls/22","id":75088523,"html_url":"https://github.com/centraldesktop/Protobuf-PHP/pull/22","diff_url":"https://github.com/centraldesktop/Protobuf-PHP/pull/22.diff","patch_url":"https://github.com/centraldesktop/Protobuf-PHP/pull/22.patch","issue_url":"https://api.github.com/repos/centraldesktop/Protobuf-PHP/issues/22","number":22,"state":"closed","locked":false,"title":"Don't send defaults over the wire","user":{"login":"hhilbert","id":1935262,"avatar_url":"https://avatars.githubusercontent.com/u/1935262?v=3","gravatar_id":"","url":"https://api.github.com/users/hhilbert","html_url":"https://github.com/hhilbert","followers_url":"https://api.github.com/users/hhilbert/followers","following_url":"https://api.github.com/users/hhilbert/following{/other_user}","gists_url":"https://api.github.com/users/hhilbert/gists{/gist_id}","starred_url":"https://api.github.com/users/hhilbert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hhilbert/subscriptions","organizations_url":"https://api.github.com/users/hhilbert/orgs","repos_url":"https://api.github.com/users/hhilbert/repos","events_url":"https://api.github.com/users/hhilbert/events{/privacy}","received_events_url":"https://api.github.com/users/hhilbert/received_events","type":"User","site_admin":false},"body":"As described here: https://developers.google.com/protocol-buffers/docs/proto#updating \"Changing a default value is generally OK, as long as you remember that default values are never sent over the wire\".\r\nI changed the codec implementations to also check for default values and don't send them.\r\nThe current implementation sends the default value over the wire also if this field was never set. That is not expected at all. \r\nReason:\r\nThe magic `__get` is checking for defaults and initializes this field to the default. This also happens when the encoder accesses this field. So also if you have not set any value for that optional field the default is send over the wire. ","created_at":"2016-06-24T09:38:45Z","updated_at":"2016-09-07T21:54:04Z","closed_at":"2016-09-07T21:54:04Z","merged_at":"2016-09-07T21:54:04Z","merge_commit_sha":"855715e1ca6760c8142f1f60290e34946585ab65","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/centraldesktop/Protobuf-PHP/pulls/22/commits","review_comments_url":"https://api.github.com/repos/centraldesktop/Protobuf-PHP/pulls/22/comments","review_comment_url":"https://api.github.com/repos/centraldesktop/Protobuf-PHP/pulls/comments{/number}","comments_url":"https://api.github.com/repos/centraldesktop/Protobuf-PHP/issues/22/comments","statuses_url":"https://api.github.com/repos/centraldesktop/Protobuf-PHP/statuses/afc07e775b419de7208819e98a016b4b964f30e1","head":{"label":"hhilbert:feature/dont-send-default-over-wire","ref":"feature/dont-send-default-over-wire","sha":"afc07e775b419de7208819e98a016b4b964f30e1","user":{"login":"hhilbert","id":1935262,"avatar_url":"https://avatars.githubusercontent.com/u/1935262?v=3","gravatar_id":"","url":"https://api.github.com/users/hhilbert","html_url":"https://github.com/hhilbert","followers_url":"https://api.github.com/users/hhilbert/followers","following_url":"https://api.github.com/users/hhilbert/following{/other_user}","gists_url":"https://api.github.com/users/hhilbert/gists{/gist_id}","starred_url":"https://api.github.com/users/hhilbert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hhilbert/subscriptions","organizations_url":"https://api.github.com/users/hhilbert/orgs","repos_url":"https://api.github.com/users/hhilbert/repos","events_url":"https://api.github.com/users/hhilbert/events{/privacy}","received_events_url":"https://api.github.com/users/hhilbert/received_events","type":"User","site_admin":false},"repo":{"id":59824235,"name":"Protobuf-PHP","full_name":"hhilbert/Protobuf-PHP","owner":{"login":"hhilbert","id":1935262,"avatar_url":"https://avatars.githubusercontent.com/u/1935262?v=3","gravatar_id":"","url":"https://api.github.com/users/hhilbert","html_url":"https://github.com/hhilbert","followers_url":"https://api.github.com/users/hhilbert/followers","following_url":"https://api.github.com/users/hhilbert/following{/other_user}","gists_url":"https://api.github.com/users/hhilbert/gists{/gist_id}","starred_url":"https://api.github.com/users/hhilbert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hhilbert/subscriptions","organizations_url":"https://api.github.com/users/hhilbert/orgs","repos_url":"https://api.github.com/users/hhilbert/repos","events_url":"https://api.github.com/users/hhilbert/events{/privacy}","received_events_url":"https://api.github.com/users/hhilbert/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/hhilbert/Protobuf-PHP","description":"PHP implementation of Google's Protocol Buffers with a protoc plugin compiler","fork":true,"url":"https://api.github.com/repos/hhilbert/Protobuf-PHP","forks_url":"https://api.github.com/repos/hhilbert/Protobuf-PHP/forks","keys_url":"https://api.github.com/repos/hhilbert/Protobuf-PHP/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hhilbert/Protobuf-PHP/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hhilbert/Protobuf-PHP/teams","hooks_url":"https://api.github.com/repos/hhilbert/Protobuf-PHP/hooks","issue_events_url":"https://api.github.com/repos/hhilbert/Protobuf-PHP/issues/events{/number}","events_url":"https://api.github.com/repos/hhilbert/Protobuf-PHP/events","assignees_url":"https://api.github.com/repos/hhilbert/Protobuf-PHP/assignees{/user}","branches_url":"https://api.github.com/repos/hhilbert/Protobuf-PHP/branches{/branch}","tags_url":"https://api.github.com/repos/hhilbert/Protobuf-PHP/tags","blobs_url":"https://api.github.com/repos/hhilbert/Protobuf-PHP/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hhilbert/Protobuf-PHP/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hhilbert/Protobuf-PHP/git/refs{/sha}","trees_url":"https://api.github.com/repos/hhilbert/Protobuf-PHP/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hhilbert/Protobuf-PHP/statuses/{sha}","languages_url":"https://api.github.com/repos/hhilbert/Protobuf-PHP/languages","stargazers_url":"https://api.github.com/repos/hhilbert/Protobuf-PHP/stargazers","contributors_url":"https://api.github.com/repos/hhilbert/Protobuf-PHP/contributors","subscribers_url":"https://api.github.com/repos/hhilbert/Protobuf-PHP/subscribers","subscription_url":"https://api.github.com/repos/hhilbert/Protobuf-PHP/subscription","commits_url":"https://api.github.com/repos/hhilbert/Protobuf-PHP/commits{/sha}","git_commits_url":"https://api.github.com/repos/hhilbert/Protobuf-PHP/git/commits{/sha}","comments_url":"https://api.github.com/repos/hhilbert/Protobuf-PHP/comments{/number}","issue_comment_url":"https://api.github.com/repos/hhilbert/Protobuf-PHP/issues/comments{/number}","contents_url":"https://api.github.com/repos/hhilbert/Protobuf-PHP/contents/{+path}","compare_url":"https://api.github.com/repos/hhilbert/Protobuf-PHP/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hhilbert/Protobuf-PHP/merges","archive_url":"https://api.github.com/repos/hhilbert/Protobuf-PHP/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hhilbert/Protobuf-PHP/downloads","issues_url":"https://api.github.com/repos/hhilbert/Protobuf-PHP/issues{/number}","pulls_url":"https://api.github.com/repos/hhilbert/Protobuf-PHP/pulls{/number}","milestones_url":"https://api.github.com/repos/hhilbert/Protobuf-PHP/milestones{/number}","notifications_url":"https://api.github.com/repos/hhilbert/Protobuf-PHP/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hhilbert/Protobuf-PHP/labels{/name}","releases_url":"https://api.github.com/repos/hhilbert/Protobuf-PHP/releases{/id}","deployments_url":"https://api.github.com/repos/hhilbert/Protobuf-PHP/deployments","created_at":"2016-05-27T09:50:52Z","updated_at":"2016-05-27T09:50:54Z","pushed_at":"2016-08-24T01:12:51Z","git_url":"git://github.com/hhilbert/Protobuf-PHP.git","ssh_url":"git@github.com:hhilbert/Protobuf-PHP.git","clone_url":"https://github.com/hhilbert/Protobuf-PHP.git","svn_url":"https://github.com/hhilbert/Protobuf-PHP","homepage":"http://drslump.github.com/Protobuf-PHP/","size":481,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"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":"centraldesktop:master","ref":"master","sha":"ed7bf437cb8fcb0a9c7e68849852981d89518ebf","user":{"login":"centraldesktop","id":148949,"avatar_url":"https://avatars.githubusercontent.com/u/148949?v=3","gravatar_id":"","url":"https://api.github.com/users/centraldesktop","html_url":"https://github.com/centraldesktop","followers_url":"https://api.github.com/users/centraldesktop/followers","following_url":"https://api.github.com/users/centraldesktop/following{/other_user}","gists_url":"https://api.github.com/users/centraldesktop/gists{/gist_id}","starred_url":"https://api.github.com/users/centraldesktop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/centraldesktop/subscriptions","organizations_url":"https://api.github.com/users/centraldesktop/orgs","repos_url":"https://api.github.com/users/centraldesktop/repos","events_url":"https://api.github.com/users/centraldesktop/events{/privacy}","received_events_url":"https://api.github.com/users/centraldesktop/received_events","type":"Organization","site_admin":false},"repo":{"id":15270832,"name":"Protobuf-PHP","full_name":"centraldesktop/Protobuf-PHP","owner":{"login":"centraldesktop","id":148949,"avatar_url":"https://avatars.githubusercontent.com/u/148949?v=3","gravatar_id":"","url":"https://api.github.com/users/centraldesktop","html_url":"https://github.com/centraldesktop","followers_url":"https://api.github.com/users/centraldesktop/followers","following_url":"https://api.github.com/users/centraldesktop/following{/other_user}","gists_url":"https://api.github.com/users/centraldesktop/gists{/gist_id}","starred_url":"https://api.github.com/users/centraldesktop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/centraldesktop/subscriptions","organizations_url":"https://api.github.com/users/centraldesktop/orgs","repos_url":"https://api.github.com/users/centraldesktop/repos","events_url":"https://api.github.com/users/centraldesktop/events{/privacy}","received_events_url":"https://api.github.com/users/centraldesktop/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/centraldesktop/Protobuf-PHP","description":"PHP implementation of Google's Protocol Buffers with a protoc plugin compiler","fork":true,"url":"https://api.github.com/repos/centraldesktop/Protobuf-PHP","forks_url":"https://api.github.com/repos/centraldesktop/Protobuf-PHP/forks","keys_url":"https://api.github.com/repos/centraldesktop/Protobuf-PHP/keys{/key_id}","collaborators_url":"https://api.github.com/repos/centraldesktop/Protobuf-PHP/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/centraldesktop/Protobuf-PHP/teams","hooks_url":"https://api.github.com/repos/centraldesktop/Protobuf-PHP/hooks","issue_events_url":"https://api.github.com/repos/centraldesktop/Protobuf-PHP/issues/events{/number}","events_url":"https://api.github.com/repos/centraldesktop/Protobuf-PHP/events","assignees_url":"https://api.github.com/repos/centraldesktop/Protobuf-PHP/assignees{/user}","branches_url":"https://api.github.com/repos/centraldesktop/Protobuf-PHP/branches{/branch}","tags_url":"https://api.github.com/repos/centraldesktop/Protobuf-PHP/tags","blobs_url":"https://api.github.com/repos/centraldesktop/Protobuf-PHP/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/centraldesktop/Protobuf-PHP/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/centraldesktop/Protobuf-PHP/git/refs{/sha}","trees_url":"https://api.github.com/repos/centraldesktop/Protobuf-PHP/git/trees{/sha}","statuses_url":"https://api.github.com/repos/centraldesktop/Protobuf-PHP/statuses/{sha}","languages_url":"https://api.github.com/repos/centraldesktop/Protobuf-PHP/languages","stargazers_url":"https://api.github.com/repos/centraldesktop/Protobuf-PHP/stargazers","contributors_url":"https://api.github.com/repos/centraldesktop/Protobuf-PHP/contributors","subscribers_url":"https://api.github.com/repos/centraldesktop/Protobuf-PHP/subscribers","subscription_url":"https://api.github.com/repos/centraldesktop/Protobuf-PHP/subscription","commits_url":"https://api.github.com/repos/centraldesktop/Protobuf-PHP/commits{/sha}","git_commits_url":"https://api.github.com/repos/centraldesktop/Protobuf-PHP/git/commits{/sha}","comments_url":"https://api.github.com/repos/centraldesktop/Protobuf-PHP/comments{/number}","issue_comment_url":"https://api.github.com/repos/centraldesktop/Protobuf-PHP/issues/comments{/number}","contents_url":"https://api.github.com/repos/centraldesktop/Protobuf-PHP/contents/{+path}","compare_url":"https://api.github.com/repos/centraldesktop/Protobuf-PHP/compare/{base}...{head}","merges_url":"https://api.github.com/repos/centraldesktop/Protobuf-PHP/merges","archive_url":"https://api.github.com/repos/centraldesktop/Protobuf-PHP/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/centraldesktop/Protobuf-PHP/downloads","issues_url":"https://api.github.com/repos/centraldesktop/Protobuf-PHP/issues{/number}","pulls_url":"https://api.github.com/repos/centraldesktop/Protobuf-PHP/pulls{/number}","milestones_url":"https://api.github.com/repos/centraldesktop/Protobuf-PHP/milestones{/number}","notifications_url":"https://api.github.com/repos/centraldesktop/Protobuf-PHP/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/centraldesktop/Protobuf-PHP/labels{/name}","releases_url":"https://api.github.com/repos/centraldesktop/Protobuf-PHP/releases{/id}","deployments_url":"https://api.github.com/repos/centraldesktop/Protobuf-PHP/deployments","created_at":"2013-12-18T01:36:22Z","updated_at":"2016-08-16T12:08:03Z","pushed_at":"2016-09-07T21:54:04Z","git_url":"git://github.com/centraldesktop/Protobuf-PHP.git","ssh_url":"git@github.com:centraldesktop/Protobuf-PHP.git","clone_url":"https://github.com/centraldesktop/Protobuf-PHP.git","svn_url":"https://github.com/centraldesktop/Protobuf-PHP","homepage":"http://drslump.github.com/Protobuf-PHP/","size":475,"stargazers_count":21,"watchers_count":21,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":18,"mirror_url":null,"open_issues_count":3,"forks":18,"open_issues":3,"watchers":21,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/centraldesktop/Protobuf-PHP/pulls/22"},"html":{"href":"https://github.com/centraldesktop/Protobuf-PHP/pull/22"},"issue":{"href":"https://api.github.com/repos/centraldesktop/Protobuf-PHP/issues/22"},"comments":{"href":"https://api.github.com/repos/centraldesktop/Protobuf-PHP/issues/22/comments"},"review_comments":{"href":"https://api.github.com/repos/centraldesktop/Protobuf-PHP/pulls/22/comments"},"review_comment":{"href":"https://api.github.com/repos/centraldesktop/Protobuf-PHP/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/centraldesktop/Protobuf-PHP/pulls/22/commits"},"statuses":{"href":"https://api.github.com/repos/centraldesktop/Protobuf-PHP/statuses/afc07e775b419de7208819e98a016b4b964f30e1"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"treyhyde","id":62077,"avatar_url":"https://avatars.githubusercontent.com/u/62077?v=3","gravatar_id":"","url":"https://api.github.com/users/treyhyde","html_url":"https://github.com/treyhyde","followers_url":"https://api.github.com/users/treyhyde/followers","following_url":"https://api.github.com/users/treyhyde/following{/other_user}","gists_url":"https://api.github.com/users/treyhyde/gists{/gist_id}","starred_url":"https://api.github.com/users/treyhyde/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/treyhyde/subscriptions","organizations_url":"https://api.github.com/users/treyhyde/orgs","repos_url":"https://api.github.com/users/treyhyde/repos","events_url":"https://api.github.com/users/treyhyde/events{/privacy}","received_events_url":"https://api.github.com/users/treyhyde/received_events","type":"User","site_admin":false},"comments":0,"review_comments":0,"commits":1,"additions":23,"deletions":16,"changed_files":3}}
{"actor":{"display_login":"treyhyde"}}