{"action":"closed","issue":{"url":"https://api.github.com/repos/symfony/symfony/issues/15606","labels_url":"https://api.github.com/repos/symfony/symfony/issues/15606/labels{/name}","comments_url":"https://api.github.com/repos/symfony/symfony/issues/15606/comments","events_url":"https://api.github.com/repos/symfony/symfony/issues/15606/events","html_url":"https://github.com/symfony/symfony/issues/15606","id":102883879,"number":15606,"title":"[Form][2.7] Incorrect/invalid select tag is generated if choices have duplicate content","user":{"login":"CriticalFix","id":5617107,"avatar_url":"https://avatars.githubusercontent.com/u/5617107?v=3","gravatar_id":"","url":"https://api.github.com/users/CriticalFix","html_url":"https://github.com/CriticalFix","followers_url":"https://api.github.com/users/CriticalFix/followers","following_url":"https://api.github.com/users/CriticalFix/following{/other_user}","gists_url":"https://api.github.com/users/CriticalFix/gists{/gist_id}","starred_url":"https://api.github.com/users/CriticalFix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CriticalFix/subscriptions","organizations_url":"https://api.github.com/users/CriticalFix/orgs","repos_url":"https://api.github.com/users/CriticalFix/repos","events_url":"https://api.github.com/users/CriticalFix/events{/privacy}","received_events_url":"https://api.github.com/users/CriticalFix/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/symfony/symfony/labels/Bug","name":"Bug","color":"e10c02"},{"url":"https://api.github.com/repos/symfony/symfony/labels/Form","name":"Form","color":"DDDDDD"},{"url":"https://api.github.com/repos/symfony/symfony/labels/Status:%20Needs%20Review","name":"Status: Needs Review","color":"ededed"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":14,"created_at":"2015-08-24T20:27:20Z","updated_at":"2015-12-22T14:51:09Z","closed_at":"2015-12-22T14:51:09Z","body":"Incorrect/invalid select tag is generated if choices have duplicate content ('Category 4').\r\n```php\r\n$f = $this->formFactory->createNamedBuilder('category', 'form')\r\n    ->add('parent_category', 'choice', array(\r\n        'label'   => 'Name',\r\n        'choices' => array(\r\n            '1' => 'Category 1',\r\n            '2' => 'Category 4',\r\n            '3' => 'Category 3',\r\n            '4' => 'Category 4',\r\n            '5' => 'Category 5'\r\n        )\r\n    ))\r\n    ->add('save', 'submit', array(\r\n        'label' => 'Save'\r\n    ))\r\n    ->getForm();\r\n```\r\n\r\n```html\r\n<select>\r\n    <option value=\"1\" >Category 1</option>\r\n    <option value=\"4\" >Category 4</option>\r\n    <option value=\"3\" >Category 3</option>\r\n    <option value=\"5\" >Category 5</option>\r\n</select>\r\n```\r\nWhere is option with value=\"2\"?"}}