{"action":"created","comment":{"url":"https://api.github.com/repos/doctrine/DoctrineModule/pulls/comments/29588384","id":29588384,"diff_hunk":"@@ -85,6 +85,11 @@ class Proxy implements ObjectManagerAwareInterface\n      */\n     protected $emptyItemLabel = '';\n \n+    /**\n+     * @var string","path":"src/DoctrineModule/Form/Element/Proxy.php","position":21,"original_position":21,"commit_id":"f251ce4ccfed38fac03ed69c35629935de6c27fd","original_commit_id":"f251ce4ccfed38fac03ed69c35629935de6c27fd","user":{"login":"danizord","id":1850941,"avatar_url":"https://avatars.githubusercontent.com/u/1850941?v=3","gravatar_id":"","url":"https://api.github.com/users/danizord","html_url":"https://github.com/danizord","followers_url":"https://api.github.com/users/danizord/followers","following_url":"https://api.github.com/users/danizord/following{/other_user}","gists_url":"https://api.github.com/users/danizord/gists{/gist_id}","starred_url":"https://api.github.com/users/danizord/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danizord/subscriptions","organizations_url":"https://api.github.com/users/danizord/orgs","repos_url":"https://api.github.com/users/danizord/repos","events_url":"https://api.github.com/users/danizord/events{/privacy}","received_events_url":"https://api.github.com/users/danizord/received_events","type":"User","site_admin":false},"body":"string|null","created_at":"2015-05-04T14:28:10Z","updated_at":"2015-05-04T14:28:10Z","html_url":"https://github.com/doctrine/DoctrineModule/pull/502#discussion_r29588384","pull_request_url":"https://api.github.com/repos/doctrine/DoctrineModule/pulls/502","_links":{"self":{"href":"https://api.github.com/repos/doctrine/DoctrineModule/pulls/comments/29588384"},"html":{"href":"https://github.com/doctrine/DoctrineModule/pull/502#discussion_r29588384"},"pull_request":{"href":"https://api.github.com/repos/doctrine/DoctrineModule/pulls/502"}}},"pull_request":{"url":"https://api.github.com/repos/doctrine/DoctrineModule/pulls/502","id":34539812,"html_url":"https://github.com/doctrine/DoctrineModule/pull/502","diff_url":"https://github.com/doctrine/DoctrineModule/pull/502.diff","patch_url":"https://github.com/doctrine/DoctrineModule/pull/502.patch","issue_url":"https://api.github.com/repos/doctrine/DoctrineModule/issues/502","number":502,"state":"open","locked":false,"title":"Feature/optgroup support","user":{"login":"manuakasam","id":1087280,"avatar_url":"https://avatars.githubusercontent.com/u/1087280?v=3","gravatar_id":"","url":"https://api.github.com/users/manuakasam","html_url":"https://github.com/manuakasam","followers_url":"https://api.github.com/users/manuakasam/followers","following_url":"https://api.github.com/users/manuakasam/following{/other_user}","gists_url":"https://api.github.com/users/manuakasam/gists{/gist_id}","starred_url":"https://api.github.com/users/manuakasam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/manuakasam/subscriptions","organizations_url":"https://api.github.com/users/manuakasam/orgs","repos_url":"https://api.github.com/users/manuakasam/repos","events_url":"https://api.github.com/users/manuakasam/events{/privacy}","received_events_url":"https://api.github.com/users/manuakasam/received_events","type":"User","site_admin":false},"body":"References #370 \r\n\r\n@gianarb this would be the first set of feature with which adding is not any danger at all I feel.\r\n\r\nHowever there's still one thing that I wouldn't see as \"that awesome\".\r\n\r\nWhen your data-structure \"optgroup\" is empty or null it will create an optgroup that has no title. While this is somewhat OK it would likely be more valid to put those empty optgroup entries within NO optgroup block at all.\r\n\r\nA further alternative is to provide yet another option key `optgroup_default` where you could define what happens to empty optgroup elements. I.e. `'optgroup_default' => 'Others'` would name the empty group \"Others\".\r\n\r\nThe above functionality is already implemented in my branch. You can check it out here:\r\nhttps://github.com/manuakasam/DoctrineModule/blob/feature/optgroup-default-container/src/DoctrineModule/Form/Element/Proxy.php#L617-L630\r\n\r\nThe downside to this is that this is quite a lot of custom code. While fully functional you may consider this too custom and not for a wide enough audience? Just gimme your thouhgt. If it's considered OK, ill write tests for those as well and hit up a follow up PR after this.","created_at":"2015-05-01T14:24:13Z","updated_at":"2015-05-04T14:28:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"eb11e6b8863cc7c2b0e9aa5fdef37b30c9cc092a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/doctrine/DoctrineModule/pulls/502/commits","review_comments_url":"https://api.github.com/repos/doctrine/DoctrineModule/pulls/502/comments","review_comment_url":"https://api.github.com/repos/doctrine/DoctrineModule/pulls/comments{/number}","comments_url":"https://api.github.com/repos/doctrine/DoctrineModule/issues/502/comments","statuses_url":"https://api.github.com/repos/doctrine/DoctrineModule/statuses/f251ce4ccfed38fac03ed69c35629935de6c27fd","head":{"label":"manuakasam:feature/optgroup-support","ref":"feature/optgroup-support","sha":"f251ce4ccfed38fac03ed69c35629935de6c27fd","user":{"login":"manuakasam","id":1087280,"avatar_url":"https://avatars.githubusercontent.com/u/1087280?v=3","gravatar_id":"","url":"https://api.github.com/users/manuakasam","html_url":"https://github.com/manuakasam","followers_url":"https://api.github.com/users/manuakasam/followers","following_url":"https://api.github.com/users/manuakasam/following{/other_user}","gists_url":"https://api.github.com/users/manuakasam/gists{/gist_id}","starred_url":"https://api.github.com/users/manuakasam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/manuakasam/subscriptions","organizations_url":"https://api.github.com/users/manuakasam/orgs","repos_url":"https://api.github.com/users/manuakasam/repos","events_url":"https://api.github.com/users/manuakasam/events{/privacy}","received_events_url":"https://api.github.com/users/manuakasam/received_events","type":"User","site_admin":false},"repo":{"id":34898412,"name":"DoctrineModule","full_name":"manuakasam/DoctrineModule","owner":{"login":"manuakasam","id":1087280,"avatar_url":"https://avatars.githubusercontent.com/u/1087280?v=3","gravatar_id":"","url":"https://api.github.com/users/manuakasam","html_url":"https://github.com/manuakasam","followers_url":"https://api.github.com/users/manuakasam/followers","following_url":"https://api.github.com/users/manuakasam/following{/other_user}","gists_url":"https://api.github.com/users/manuakasam/gists{/gist_id}","starred_url":"https://api.github.com/users/manuakasam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/manuakasam/subscriptions","organizations_url":"https://api.github.com/users/manuakasam/orgs","repos_url":"https://api.github.com/users/manuakasam/repos","events_url":"https://api.github.com/users/manuakasam/events{/privacy}","received_events_url":"https://api.github.com/users/manuakasam/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/manuakasam/DoctrineModule","description":"Zend Framework 2 Module for Doctrine","fork":true,"url":"https://api.github.com/repos/manuakasam/DoctrineModule","forks_url":"https://api.github.com/repos/manuakasam/DoctrineModule/forks","keys_url":"https://api.github.com/repos/manuakasam/DoctrineModule/keys{/key_id}","collaborators_url":"https://api.github.com/repos/manuakasam/DoctrineModule/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/manuakasam/DoctrineModule/teams","hooks_url":"https://api.github.com/repos/manuakasam/DoctrineModule/hooks","issue_events_url":"https://api.github.com/repos/manuakasam/DoctrineModule/issues/events{/number}","events_url":"https://api.github.com/repos/manuakasam/DoctrineModule/events","assignees_url":"https://api.github.com/repos/manuakasam/DoctrineModule/assignees{/user}","branches_url":"https://api.github.com/repos/manuakasam/DoctrineModule/branches{/branch}","tags_url":"https://api.github.com/repos/manuakasam/DoctrineModule/tags","blobs_url":"https://api.github.com/repos/manuakasam/DoctrineModule/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/manuakasam/DoctrineModule/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/manuakasam/DoctrineModule/git/refs{/sha}","trees_url":"https://api.github.com/repos/manuakasam/DoctrineModule/git/trees{/sha}","statuses_url":"https://api.github.com/repos/manuakasam/DoctrineModule/statuses/{sha}","languages_url":"https://api.github.com/repos/manuakasam/DoctrineModule/languages","stargazers_url":"https://api.github.com/repos/manuakasam/DoctrineModule/stargazers","contributors_url":"https://api.github.com/repos/manuakasam/DoctrineModule/contributors","subscribers_url":"https://api.github.com/repos/manuakasam/DoctrineModule/subscribers","subscription_url":"https://api.github.com/repos/manuakasam/DoctrineModule/subscription","commits_url":"https://api.github.com/repos/manuakasam/DoctrineModule/commits{/sha}","git_commits_url":"https://api.github.com/repos/manuakasam/DoctrineModule/git/commits{/sha}","comments_url":"https://api.github.com/repos/manuakasam/DoctrineModule/comments{/number}","issue_comment_url":"https://api.github.com/repos/manuakasam/DoctrineModule/issues/comments{/number}","contents_url":"https://api.github.com/repos/manuakasam/DoctrineModule/contents/{+path}","compare_url":"https://api.github.com/repos/manuakasam/DoctrineModule/compare/{base}...{head}","merges_url":"https://api.github.com/repos/manuakasam/DoctrineModule/merges","archive_url":"https://api.github.com/repos/manuakasam/DoctrineModule/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/manuakasam/DoctrineModule/downloads","issues_url":"https://api.github.com/repos/manuakasam/DoctrineModule/issues{/number}","pulls_url":"https://api.github.com/repos/manuakasam/DoctrineModule/pulls{/number}","milestones_url":"https://api.github.com/repos/manuakasam/DoctrineModule/milestones{/number}","notifications_url":"https://api.github.com/repos/manuakasam/DoctrineModule/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/manuakasam/DoctrineModule/labels{/name}","releases_url":"https://api.github.com/repos/manuakasam/DoctrineModule/releases{/id}","created_at":"2015-05-01T10:31:22Z","updated_at":"2015-05-01T10:31:23Z","pushed_at":"2015-05-01T14:22:39Z","git_url":"git://github.com/manuakasam/DoctrineModule.git","ssh_url":"git@github.com:manuakasam/DoctrineModule.git","clone_url":"https://github.com/manuakasam/DoctrineModule.git","svn_url":"https://github.com/manuakasam/DoctrineModule","homepage":"http://www.doctrine-project.org/jira","size":1994,"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":"doctrine:master","ref":"master","sha":"397d80607a60c653ee496125bfb174a7af70f783","user":{"login":"doctrine","id":209254,"avatar_url":"https://avatars.githubusercontent.com/u/209254?v=3","gravatar_id":"","url":"https://api.github.com/users/doctrine","html_url":"https://github.com/doctrine","followers_url":"https://api.github.com/users/doctrine/followers","following_url":"https://api.github.com/users/doctrine/following{/other_user}","gists_url":"https://api.github.com/users/doctrine/gists{/gist_id}","starred_url":"https://api.github.com/users/doctrine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/doctrine/subscriptions","organizations_url":"https://api.github.com/users/doctrine/orgs","repos_url":"https://api.github.com/users/doctrine/repos","events_url":"https://api.github.com/users/doctrine/events{/privacy}","received_events_url":"https://api.github.com/users/doctrine/received_events","type":"Organization","site_admin":false},"repo":{"id":3072250,"name":"DoctrineModule","full_name":"doctrine/DoctrineModule","owner":{"login":"doctrine","id":209254,"avatar_url":"https://avatars.githubusercontent.com/u/209254?v=3","gravatar_id":"","url":"https://api.github.com/users/doctrine","html_url":"https://github.com/doctrine","followers_url":"https://api.github.com/users/doctrine/followers","following_url":"https://api.github.com/users/doctrine/following{/other_user}","gists_url":"https://api.github.com/users/doctrine/gists{/gist_id}","starred_url":"https://api.github.com/users/doctrine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/doctrine/subscriptions","organizations_url":"https://api.github.com/users/doctrine/orgs","repos_url":"https://api.github.com/users/doctrine/repos","events_url":"https://api.github.com/users/doctrine/events{/privacy}","received_events_url":"https://api.github.com/users/doctrine/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/doctrine/DoctrineModule","description":"Zend Framework 2 Module for Doctrine","fork":false,"url":"https://api.github.com/repos/doctrine/DoctrineModule","forks_url":"https://api.github.com/repos/doctrine/DoctrineModule/forks","keys_url":"https://api.github.com/repos/doctrine/DoctrineModule/keys{/key_id}","collaborators_url":"https://api.github.com/repos/doctrine/DoctrineModule/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/doctrine/DoctrineModule/teams","hooks_url":"https://api.github.com/repos/doctrine/DoctrineModule/hooks","issue_events_url":"https://api.github.com/repos/doctrine/DoctrineModule/issues/events{/number}","events_url":"https://api.github.com/repos/doctrine/DoctrineModule/events","assignees_url":"https://api.github.com/repos/doctrine/DoctrineModule/assignees{/user}","branches_url":"https://api.github.com/repos/doctrine/DoctrineModule/branches{/branch}","tags_url":"https://api.github.com/repos/doctrine/DoctrineModule/tags","blobs_url":"https://api.github.com/repos/doctrine/DoctrineModule/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/doctrine/DoctrineModule/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/doctrine/DoctrineModule/git/refs{/sha}","trees_url":"https://api.github.com/repos/doctrine/DoctrineModule/git/trees{/sha}","statuses_url":"https://api.github.com/repos/doctrine/DoctrineModule/statuses/{sha}","languages_url":"https://api.github.com/repos/doctrine/DoctrineModule/languages","stargazers_url":"https://api.github.com/repos/doctrine/DoctrineModule/stargazers","contributors_url":"https://api.github.com/repos/doctrine/DoctrineModule/contributors","subscribers_url":"https://api.github.com/repos/doctrine/DoctrineModule/subscribers","subscription_url":"https://api.github.com/repos/doctrine/DoctrineModule/subscription","commits_url":"https://api.github.com/repos/doctrine/DoctrineModule/commits{/sha}","git_commits_url":"https://api.github.com/repos/doctrine/DoctrineModule/git/commits{/sha}","comments_url":"https://api.github.com/repos/doctrine/DoctrineModule/comments{/number}","issue_comment_url":"https://api.github.com/repos/doctrine/DoctrineModule/issues/comments{/number}","contents_url":"https://api.github.com/repos/doctrine/DoctrineModule/contents/{+path}","compare_url":"https://api.github.com/repos/doctrine/DoctrineModule/compare/{base}...{head}","merges_url":"https://api.github.com/repos/doctrine/DoctrineModule/merges","archive_url":"https://api.github.com/repos/doctrine/DoctrineModule/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/doctrine/DoctrineModule/downloads","issues_url":"https://api.github.com/repos/doctrine/DoctrineModule/issues{/number}","pulls_url":"https://api.github.com/repos/doctrine/DoctrineModule/pulls{/number}","milestones_url":"https://api.github.com/repos/doctrine/DoctrineModule/milestones{/number}","notifications_url":"https://api.github.com/repos/doctrine/DoctrineModule/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/doctrine/DoctrineModule/labels{/name}","releases_url":"https://api.github.com/repos/doctrine/DoctrineModule/releases{/id}","created_at":"2011-12-30T01:44:19Z","updated_at":"2015-04-28T07:11:34Z","pushed_at":"2015-05-01T14:24:13Z","git_url":"git://github.com/doctrine/DoctrineModule.git","ssh_url":"git@github.com:doctrine/DoctrineModule.git","clone_url":"https://github.com/doctrine/DoctrineModule.git","svn_url":"https://github.com/doctrine/DoctrineModule","homepage":"http://www.doctrine-project.org/jira","size":4270,"stargazers_count":299,"watchers_count":299,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":219,"mirror_url":null,"open_issues_count":76,"forks":219,"open_issues":76,"watchers":299,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/doctrine/DoctrineModule/pulls/502"},"html":{"href":"https://github.com/doctrine/DoctrineModule/pull/502"},"issue":{"href":"https://api.github.com/repos/doctrine/DoctrineModule/issues/502"},"comments":{"href":"https://api.github.com/repos/doctrine/DoctrineModule/issues/502/comments"},"review_comments":{"href":"https://api.github.com/repos/doctrine/DoctrineModule/pulls/502/comments"},"review_comment":{"href":"https://api.github.com/repos/doctrine/DoctrineModule/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/doctrine/DoctrineModule/pulls/502/commits"},"statuses":{"href":"https://api.github.com/repos/doctrine/DoctrineModule/statuses/f251ce4ccfed38fac03ed69c35629935de6c27fd"}}}}