{"action":"created","comment":{"url":"https://api.github.com/repos/symfony/symfony-docs/pulls/comments/27737358","id":27737358,"diff_hunk":"@@ -119,9 +119,19 @@ With this option you can also allow float values to be selected as data.\n \n     // ...\n     $builder->add('status', 'choice', array(\n-      'choice_list' => new ChoiceList(array(1, 0.5), array('Full', 'Half'))\n+      'choice_list' => new ChoiceList(array(1, 0.5, 0.1), array('Full', 'Half', 'Almost empty'))\n     ));\n \n+The ``status`` field created by the code above will be rendered as:\n+\n+.. code-block:: html\n+\n+    <select name=\"status\">\n+        <option value=\"0\">Full</option>\n+        <option value=\"1\">Half</option>\n+        <option value=\"2\">Almost empty</option>\n+    </select>\n+","path":"reference/forms/types/choice.rst","position":26,"original_position":26,"commit_id":"5bc5969903e755af3a6811af3e1c63e1ee02b33c","original_commit_id":"5bc5969903e755af3a6811af3e1c63e1ee02b33c","user":{"login":"weaverryan","id":121003,"avatar_url":"https://avatars.githubusercontent.com/u/121003?v=3","gravatar_id":"","url":"https://api.github.com/users/weaverryan","html_url":"https://github.com/weaverryan","followers_url":"https://api.github.com/users/weaverryan/followers","following_url":"https://api.github.com/users/weaverryan/following{/other_user}","gists_url":"https://api.github.com/users/weaverryan/gists{/gist_id}","starred_url":"https://api.github.com/users/weaverryan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weaverryan/subscriptions","organizations_url":"https://api.github.com/users/weaverryan/orgs","repos_url":"https://api.github.com/users/weaverryan/repos","events_url":"https://api.github.com/users/weaverryan/events{/privacy}","received_events_url":"https://api.github.com/users/weaverryan/received_events","type":"User","site_admin":false},"body":"This is a nice addition, because as I was reading this, I was in fact confused as you described in the PR description :). Can we add one more line after this? I'd like something that basically says: \"But don't be confused! If ``Full`` is selected (value 0 in HTML), 1 will be returned in your form. If ``Almost empty`` is selected (value 2 in HTML), 2 will be returned\".","created_at":"2015-04-03T16:06:08Z","updated_at":"2015-04-03T16:06:08Z","html_url":"https://github.com/symfony/symfony-docs/pull/5052#discussion_r27737358","pull_request_url":"https://api.github.com/repos/symfony/symfony-docs/pulls/5052","_links":{"self":{"href":"https://api.github.com/repos/symfony/symfony-docs/pulls/comments/27737358"},"html":{"href":"https://github.com/symfony/symfony-docs/pull/5052#discussion_r27737358"},"pull_request":{"href":"https://api.github.com/repos/symfony/symfony-docs/pulls/5052"}}},"pull_request":{"url":"https://api.github.com/repos/symfony/symfony-docs/pulls/5052","id":30254873,"html_url":"https://github.com/symfony/symfony-docs/pull/5052","diff_url":"https://github.com/symfony/symfony-docs/pull/5052.diff","patch_url":"https://github.com/symfony/symfony-docs/pull/5052.patch","issue_url":"https://api.github.com/repos/symfony/symfony-docs/issues/5052","number":5052,"state":"open","locked":false,"title":"improved description of choice_list option of Choice form type","user":{"login":"adamziel","id":205419,"avatar_url":"https://avatars.githubusercontent.com/u/205419?v=3","gravatar_id":"","url":"https://api.github.com/users/adamziel","html_url":"https://github.com/adamziel","followers_url":"https://api.github.com/users/adamziel/followers","following_url":"https://api.github.com/users/adamziel/following{/other_user}","gists_url":"https://api.github.com/users/adamziel/gists{/gist_id}","starred_url":"https://api.github.com/users/adamziel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adamziel/subscriptions","organizations_url":"https://api.github.com/users/adamziel/orgs","repos_url":"https://api.github.com/users/adamziel/repos","events_url":"https://api.github.com/users/adamziel/events{/privacy}","received_events_url":"https://api.github.com/users/adamziel/received_events","type":"User","site_admin":false},"body":"Current example could be a bit confusing since rendered HTML would look like this:\r\n\r\n```html\r\n<select>\r\n    <option value=\"0\">Full</option>\r\n    <option value=\"1\">Half</option>\r\n</select>\r\n```\r\n\r\nWhich could easily be confued with truncated floats. In other words this is very similar to what would happen if `choices` option was set to `array(1=>'Full', 0.5=>'Half')`. This pull request is an attempt to give a clue \"a-ha, it's an index and not a float representation\".\r\n\r\n","created_at":"2015-03-02T02:22:42Z","updated_at":"2015-04-03T16:06:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"36dc11700f1d779d396b8c428779cfe1e7d9a85d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/symfony/symfony-docs/pulls/5052/commits","review_comments_url":"https://api.github.com/repos/symfony/symfony-docs/pulls/5052/comments","review_comment_url":"https://api.github.com/repos/symfony/symfony-docs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/symfony/symfony-docs/issues/5052/comments","statuses_url":"https://api.github.com/repos/symfony/symfony-docs/statuses/5bc5969903e755af3a6811af3e1c63e1ee02b33c","head":{"label":"adamziel:improve_choice_list","ref":"improve_choice_list","sha":"5bc5969903e755af3a6811af3e1c63e1ee02b33c","user":{"login":"adamziel","id":205419,"avatar_url":"https://avatars.githubusercontent.com/u/205419?v=3","gravatar_id":"","url":"https://api.github.com/users/adamziel","html_url":"https://github.com/adamziel","followers_url":"https://api.github.com/users/adamziel/followers","following_url":"https://api.github.com/users/adamziel/following{/other_user}","gists_url":"https://api.github.com/users/adamziel/gists{/gist_id}","starred_url":"https://api.github.com/users/adamziel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adamziel/subscriptions","organizations_url":"https://api.github.com/users/adamziel/orgs","repos_url":"https://api.github.com/users/adamziel/repos","events_url":"https://api.github.com/users/adamziel/events{/privacy}","received_events_url":"https://api.github.com/users/adamziel/received_events","type":"User","site_admin":false},"repo":{"id":31519479,"name":"symfony-docs","full_name":"adamziel/symfony-docs","owner":{"login":"adamziel","id":205419,"avatar_url":"https://avatars.githubusercontent.com/u/205419?v=3","gravatar_id":"","url":"https://api.github.com/users/adamziel","html_url":"https://github.com/adamziel","followers_url":"https://api.github.com/users/adamziel/followers","following_url":"https://api.github.com/users/adamziel/following{/other_user}","gists_url":"https://api.github.com/users/adamziel/gists{/gist_id}","starred_url":"https://api.github.com/users/adamziel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adamziel/subscriptions","organizations_url":"https://api.github.com/users/adamziel/orgs","repos_url":"https://api.github.com/users/adamziel/repos","events_url":"https://api.github.com/users/adamziel/events{/privacy}","received_events_url":"https://api.github.com/users/adamziel/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/adamziel/symfony-docs","description":"The Symfony2 documentation","fork":true,"url":"https://api.github.com/repos/adamziel/symfony-docs","forks_url":"https://api.github.com/repos/adamziel/symfony-docs/forks","keys_url":"https://api.github.com/repos/adamziel/symfony-docs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/adamziel/symfony-docs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/adamziel/symfony-docs/teams","hooks_url":"https://api.github.com/repos/adamziel/symfony-docs/hooks","issue_events_url":"https://api.github.com/repos/adamziel/symfony-docs/issues/events{/number}","events_url":"https://api.github.com/repos/adamziel/symfony-docs/events","assignees_url":"https://api.github.com/repos/adamziel/symfony-docs/assignees{/user}","branches_url":"https://api.github.com/repos/adamziel/symfony-docs/branches{/branch}","tags_url":"https://api.github.com/repos/adamziel/symfony-docs/tags","blobs_url":"https://api.github.com/repos/adamziel/symfony-docs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/adamziel/symfony-docs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/adamziel/symfony-docs/git/refs{/sha}","trees_url":"https://api.github.com/repos/adamziel/symfony-docs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/adamziel/symfony-docs/statuses/{sha}","languages_url":"https://api.github.com/repos/adamziel/symfony-docs/languages","stargazers_url":"https://api.github.com/repos/adamziel/symfony-docs/stargazers","contributors_url":"https://api.github.com/repos/adamziel/symfony-docs/contributors","subscribers_url":"https://api.github.com/repos/adamziel/symfony-docs/subscribers","subscription_url":"https://api.github.com/repos/adamziel/symfony-docs/subscription","commits_url":"https://api.github.com/repos/adamziel/symfony-docs/commits{/sha}","git_commits_url":"https://api.github.com/repos/adamziel/symfony-docs/git/commits{/sha}","comments_url":"https://api.github.com/repos/adamziel/symfony-docs/comments{/number}","issue_comment_url":"https://api.github.com/repos/adamziel/symfony-docs/issues/comments{/number}","contents_url":"https://api.github.com/repos/adamziel/symfony-docs/contents/{+path}","compare_url":"https://api.github.com/repos/adamziel/symfony-docs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/adamziel/symfony-docs/merges","archive_url":"https://api.github.com/repos/adamziel/symfony-docs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/adamziel/symfony-docs/downloads","issues_url":"https://api.github.com/repos/adamziel/symfony-docs/issues{/number}","pulls_url":"https://api.github.com/repos/adamziel/symfony-docs/pulls{/number}","milestones_url":"https://api.github.com/repos/adamziel/symfony-docs/milestones{/number}","notifications_url":"https://api.github.com/repos/adamziel/symfony-docs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/adamziel/symfony-docs/labels{/name}","releases_url":"https://api.github.com/repos/adamziel/symfony-docs/releases{/id}","created_at":"2015-03-02T02:15:07Z","updated_at":"2015-03-02T02:15:12Z","pushed_at":"2015-03-02T02:17:52Z","git_url":"git://github.com/adamziel/symfony-docs.git","ssh_url":"git@github.com:adamziel/symfony-docs.git","clone_url":"https://github.com/adamziel/symfony-docs.git","svn_url":"https://github.com/adamziel/symfony-docs","homepage":"http://symfony.com/doc/current/","size":25486,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":false,"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":"symfony:2.3","ref":"2.3","sha":"f3cff0bcc35a7709542ea046b9fceeedb5d31e63","user":{"login":"symfony","id":143937,"avatar_url":"https://avatars.githubusercontent.com/u/143937?v=3","gravatar_id":"","url":"https://api.github.com/users/symfony","html_url":"https://github.com/symfony","followers_url":"https://api.github.com/users/symfony/followers","following_url":"https://api.github.com/users/symfony/following{/other_user}","gists_url":"https://api.github.com/users/symfony/gists{/gist_id}","starred_url":"https://api.github.com/users/symfony/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/symfony/subscriptions","organizations_url":"https://api.github.com/users/symfony/orgs","repos_url":"https://api.github.com/users/symfony/repos","events_url":"https://api.github.com/users/symfony/events{/privacy}","received_events_url":"https://api.github.com/users/symfony/received_events","type":"Organization","site_admin":false},"repo":{"id":521583,"name":"symfony-docs","full_name":"symfony/symfony-docs","owner":{"login":"symfony","id":143937,"avatar_url":"https://avatars.githubusercontent.com/u/143937?v=3","gravatar_id":"","url":"https://api.github.com/users/symfony","html_url":"https://github.com/symfony","followers_url":"https://api.github.com/users/symfony/followers","following_url":"https://api.github.com/users/symfony/following{/other_user}","gists_url":"https://api.github.com/users/symfony/gists{/gist_id}","starred_url":"https://api.github.com/users/symfony/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/symfony/subscriptions","organizations_url":"https://api.github.com/users/symfony/orgs","repos_url":"https://api.github.com/users/symfony/repos","events_url":"https://api.github.com/users/symfony/events{/privacy}","received_events_url":"https://api.github.com/users/symfony/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/symfony/symfony-docs","description":"The Symfony2 documentation","fork":false,"url":"https://api.github.com/repos/symfony/symfony-docs","forks_url":"https://api.github.com/repos/symfony/symfony-docs/forks","keys_url":"https://api.github.com/repos/symfony/symfony-docs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/symfony/symfony-docs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/symfony/symfony-docs/teams","hooks_url":"https://api.github.com/repos/symfony/symfony-docs/hooks","issue_events_url":"https://api.github.com/repos/symfony/symfony-docs/issues/events{/number}","events_url":"https://api.github.com/repos/symfony/symfony-docs/events","assignees_url":"https://api.github.com/repos/symfony/symfony-docs/assignees{/user}","branches_url":"https://api.github.com/repos/symfony/symfony-docs/branches{/branch}","tags_url":"https://api.github.com/repos/symfony/symfony-docs/tags","blobs_url":"https://api.github.com/repos/symfony/symfony-docs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/symfony/symfony-docs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/symfony/symfony-docs/git/refs{/sha}","trees_url":"https://api.github.com/repos/symfony/symfony-docs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/symfony/symfony-docs/statuses/{sha}","languages_url":"https://api.github.com/repos/symfony/symfony-docs/languages","stargazers_url":"https://api.github.com/repos/symfony/symfony-docs/stargazers","contributors_url":"https://api.github.com/repos/symfony/symfony-docs/contributors","subscribers_url":"https://api.github.com/repos/symfony/symfony-docs/subscribers","subscription_url":"https://api.github.com/repos/symfony/symfony-docs/subscription","commits_url":"https://api.github.com/repos/symfony/symfony-docs/commits{/sha}","git_commits_url":"https://api.github.com/repos/symfony/symfony-docs/git/commits{/sha}","comments_url":"https://api.github.com/repos/symfony/symfony-docs/comments{/number}","issue_comment_url":"https://api.github.com/repos/symfony/symfony-docs/issues/comments{/number}","contents_url":"https://api.github.com/repos/symfony/symfony-docs/contents/{+path}","compare_url":"https://api.github.com/repos/symfony/symfony-docs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/symfony/symfony-docs/merges","archive_url":"https://api.github.com/repos/symfony/symfony-docs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/symfony/symfony-docs/downloads","issues_url":"https://api.github.com/repos/symfony/symfony-docs/issues{/number}","pulls_url":"https://api.github.com/repos/symfony/symfony-docs/pulls{/number}","milestones_url":"https://api.github.com/repos/symfony/symfony-docs/milestones{/number}","notifications_url":"https://api.github.com/repos/symfony/symfony-docs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/symfony/symfony-docs/labels{/name}","releases_url":"https://api.github.com/repos/symfony/symfony-docs/releases{/id}","created_at":"2010-02-17T08:43:51Z","updated_at":"2015-04-02T13:40:45Z","pushed_at":"2015-04-03T15:45:40Z","git_url":"git://github.com/symfony/symfony-docs.git","ssh_url":"git@github.com:symfony/symfony-docs.git","clone_url":"https://github.com/symfony/symfony-docs.git","svn_url":"https://github.com/symfony/symfony-docs","homepage":"http://symfony.com/doc/current/","size":59398,"stargazers_count":968,"watchers_count":968,"language":"Python","has_issues":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":1772,"mirror_url":null,"open_issues_count":268,"forks":1772,"open_issues":268,"watchers":968,"default_branch":"2.7"}},"_links":{"self":{"href":"https://api.github.com/repos/symfony/symfony-docs/pulls/5052"},"html":{"href":"https://github.com/symfony/symfony-docs/pull/5052"},"issue":{"href":"https://api.github.com/repos/symfony/symfony-docs/issues/5052"},"comments":{"href":"https://api.github.com/repos/symfony/symfony-docs/issues/5052/comments"},"review_comments":{"href":"https://api.github.com/repos/symfony/symfony-docs/pulls/5052/comments"},"review_comment":{"href":"https://api.github.com/repos/symfony/symfony-docs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/symfony/symfony-docs/pulls/5052/commits"},"statuses":{"href":"https://api.github.com/repos/symfony/symfony-docs/statuses/5bc5969903e755af3a6811af3e1c63e1ee02b33c"}}}}