{"action":"created","issue":{"url":"https://api.github.com/repos/symfony/symfony/issues/16802","labels_url":"https://api.github.com/repos/symfony/symfony/issues/16802/labels{/name}","comments_url":"https://api.github.com/repos/symfony/symfony/issues/16802/comments","events_url":"https://api.github.com/repos/symfony/symfony/issues/16802/events","html_url":"https://github.com/symfony/symfony/issues/16802","id":119926852,"number":16802,"title":"ChoiceType returns wrong data on submit if clearMissing is false","user":{"login":"ossinkine","id":2588533,"avatar_url":"https://avatars.githubusercontent.com/u/2588533?v=3","gravatar_id":"","url":"https://api.github.com/users/ossinkine","html_url":"https://github.com/ossinkine","followers_url":"https://api.github.com/users/ossinkine/followers","following_url":"https://api.github.com/users/ossinkine/following{/other_user}","gists_url":"https://api.github.com/users/ossinkine/gists{/gist_id}","starred_url":"https://api.github.com/users/ossinkine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ossinkine/subscriptions","organizations_url":"https://api.github.com/users/ossinkine/orgs","repos_url":"https://api.github.com/users/ossinkine/repos","events_url":"https://api.github.com/users/ossinkine/events{/privacy}","received_events_url":"https://api.github.com/users/ossinkine/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":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-12-02T12:00:19Z","updated_at":"2015-12-02T12:11:06Z","closed_at":null,"body":"I've created `TestFormType`\r\n```php\r\nclass TestType extends AbstractType\r\n{\r\n    public function buildForm(FormBuilderInterface $builder, array $options)\r\n    {\r\n        $builder\r\n            ->add('text', 'text')\r\n            ->add('choice', 'choice', ['choices' => ['foo', 'bar']])\r\n        ;\r\n    }\r\n\r\n    public function getName()\r\n    {\r\n        return 'test';\r\n    }\r\n}\r\n```\r\n\r\ncreated the form and trying to submit data\r\n\r\n```php\r\n$data = [\r\n    'text'   => 'foo',\r\n    'choice' => 'foo',\r\n];\r\n$form = $this->createForm('test', $data);\r\n$form->submit(\r\n    [\r\n        'text'   => 'bar',\r\n        'choice' => 'bar',\r\n    ],\r\n    false\r\n);\r\n```\r\n\r\nand now `$form->getData()` will return an array:\r\n```php\r\narray (size=2)\r\n    'text' => string 'bar' (length=3)\r\n    'choice' => string 'foo' (length=3)\r\n```\r\n\r\nI expect to receive `bar` for both fields.\r\n\r\nI'm working on the latest version of 2.7 branch\r\nSee a fork for Symfony Standard Edition that reproduces this issue https://github.com/ossinkine/symfony-standard/tree/issue-16802"},"comment":{"url":"https://api.github.com/repos/symfony/symfony/issues/comments/161273650","html_url":"https://github.com/symfony/symfony/issues/16802#issuecomment-161273650","issue_url":"https://api.github.com/repos/symfony/symfony/issues/16802","id":161273650,"user":{"login":"stof","id":439401,"avatar_url":"https://avatars.githubusercontent.com/u/439401?v=3","gravatar_id":"","url":"https://api.github.com/users/stof","html_url":"https://github.com/stof","followers_url":"https://api.github.com/users/stof/followers","following_url":"https://api.github.com/users/stof/following{/other_user}","gists_url":"https://api.github.com/users/stof/gists{/gist_id}","starred_url":"https://api.github.com/users/stof/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stof/subscriptions","organizations_url":"https://api.github.com/users/stof/orgs","repos_url":"https://api.github.com/users/stof/repos","events_url":"https://api.github.com/users/stof/events{/privacy}","received_events_url":"https://api.github.com/users/stof/received_events","type":"User","site_admin":false},"created_at":"2015-12-02T12:11:06Z","updated_at":"2015-12-02T12:11:06Z","body":"@webmozart can you take a look ?"}}