{"action":"created","issue":{"url":"https://api.github.com/repos/symfony/symfony/issues/15069","labels_url":"https://api.github.com/repos/symfony/symfony/issues/15069/labels{/name}","comments_url":"https://api.github.com/repos/symfony/symfony/issues/15069/comments","events_url":"https://api.github.com/repos/symfony/symfony/issues/15069/events","html_url":"https://github.com/symfony/symfony/pull/15069","id":90182485,"number":15069,"title":"[Form] Fixed: Data mappers always receive forms indexed by their names","user":{"login":"webmozart","id":176399,"avatar_url":"https://avatars.githubusercontent.com/u/176399?v=3","gravatar_id":"","url":"https://api.github.com/users/webmozart","html_url":"https://github.com/webmozart","followers_url":"https://api.github.com/users/webmozart/followers","following_url":"https://api.github.com/users/webmozart/following{/other_user}","gists_url":"https://api.github.com/users/webmozart/gists{/gist_id}","starred_url":"https://api.github.com/users/webmozart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/webmozart/subscriptions","organizations_url":"https://api.github.com/users/webmozart/orgs","repos_url":"https://api.github.com/users/webmozart/repos","events_url":"https://api.github.com/users/webmozart/events{/privacy}","received_events_url":"https://api.github.com/users/webmozart/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/Ready","name":"Ready","color":"009800"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-06-22T19:01:50Z","updated_at":"2015-06-25T12:57:20Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/symfony/symfony/pulls/15069","html_url":"https://github.com/symfony/symfony/pull/15069","diff_url":"https://github.com/symfony/symfony/pull/15069.diff","patch_url":"https://github.com/symfony/symfony/pull/15069.patch"},"body":"| Q             | A\r\n| ------------- | ---\r\n| Bug fix?      | yes\r\n| New feature?  | no\r\n| BC breaks?    | no\r\n| Deprecations? | no\r\n| Tests pass?   | yes\r\n| Fixed tickets | -\r\n| License       | MIT\r\n| Doc PR        | -\r\n\r\nThis PR facilitates writing domain-specific data mappers, since it guarantees that you can access forms by name in the data mapper methods. Currently, `Form::add()` does not set the index of the array passed to the data mapper to the form's name."},"comment":{"url":"https://api.github.com/repos/symfony/symfony/issues/comments/115244727","html_url":"https://github.com/symfony/symfony/pull/15069#issuecomment-115244727","issue_url":"https://api.github.com/repos/symfony/symfony/issues/15069","id":115244727,"user":{"login":"webmozart","id":176399,"avatar_url":"https://avatars.githubusercontent.com/u/176399?v=3","gravatar_id":"","url":"https://api.github.com/users/webmozart","html_url":"https://github.com/webmozart","followers_url":"https://api.github.com/users/webmozart/followers","following_url":"https://api.github.com/users/webmozart/following{/other_user}","gists_url":"https://api.github.com/users/webmozart/gists{/gist_id}","starred_url":"https://api.github.com/users/webmozart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/webmozart/subscriptions","organizations_url":"https://api.github.com/users/webmozart/orgs","repos_url":"https://api.github.com/users/webmozart/repos","events_url":"https://api.github.com/users/webmozart/events{/privacy}","received_events_url":"https://api.github.com/users/webmozart/received_events","type":"User","site_admin":false},"created_at":"2015-06-25T12:57:20Z","updated_at":"2015-06-25T12:57:20Z","body":"@xabbuh Yes exactly. If you want to write a custom data mapper for a specific, you currently *cannot* access array entries by their field names.\r\n\r\n@weaverryan Accessing entries by numeric indices doesn't work, since in other cases (`setData()` and `submit()`) the data mapper *already* receives the data indexed by field names. So this was the only exception which I fixed."}}