{"action":"created","issue":{"url":"https://api.github.com/repos/symfony/symfony/issues/15037","labels_url":"https://api.github.com/repos/symfony/symfony/issues/15037/labels{/name}","comments_url":"https://api.github.com/repos/symfony/symfony/issues/15037/comments","events_url":"https://api.github.com/repos/symfony/symfony/issues/15037/events","html_url":"https://github.com/symfony/symfony/issues/15037","id":89573828,"number":15037,"title":"[Form][BC-break] choice-list option breaks rendering of the form","user":{"login":"aledeg","id":3056148,"avatar_url":"https://avatars.githubusercontent.com/u/3056148?v=3","gravatar_id":"","url":"https://api.github.com/users/aledeg","html_url":"https://github.com/aledeg","followers_url":"https://api.github.com/users/aledeg/followers","following_url":"https://api.github.com/users/aledeg/following{/other_user}","gists_url":"https://api.github.com/users/aledeg/gists{/gist_id}","starred_url":"https://api.github.com/users/aledeg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aledeg/subscriptions","organizations_url":"https://api.github.com/users/aledeg/orgs","repos_url":"https://api.github.com/users/aledeg/repos","events_url":"https://api.github.com/users/aledeg/events{/privacy}","received_events_url":"https://api.github.com/users/aledeg/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/symfony/symfony/labels/Form","name":"Form","color":"DDDDDD"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-06-19T14:09:14Z","updated_at":"2015-06-22T14:26:53Z","closed_at":null,"body":"I created a custom type which uses a custom *LazyChoiceList* object to load my choices. It was working from SF2.4 to SF2.6.\r\nWith SF2.7, I got the following error message:\r\n\r\n> Catchable Fatal Error: Argument 1 passed to Symfony\\Component\\Form\\ChoiceList\\Factory \\DefaultChoiceListFactory::Symfony\\Component\\Form\\ChoiceList\\Factory\\{closure}() must be an instance of Symfony\\Component\\Form\\Extension\\Core\\View\\ChoiceView, array given\r\n\r\nAfter investigation, the problem comes from the *createView* method in *Symfony\\Component\\Form\\ChoiceList\\Factory\\DefaultChoiceListFactory.php*.\r\n\r\nAs I am using deprecated code in 2.7, I use the first part of the code. Unfortunately, the closure can not work since it accepts only *LegacyChoiceView* objects and it receives arrays.\r\n\r\nIf one change the hint to array, the closure code won't work since an object is needed.\r\nIf one change the return type of the method *getRemainingView* from array to *LegacyChoiceView*, the array_map won't work since its second parameter must be an array.\r\n\r\nI read 2.8 code and this code is still there.\r\n"},"comment":{"url":"https://api.github.com/repos/symfony/symfony/issues/comments/114127868","html_url":"https://github.com/symfony/symfony/issues/15037#issuecomment-114127868","issue_url":"https://api.github.com/repos/symfony/symfony/issues/15037","id":114127868,"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-22T14:26:53Z","updated_at":"2015-06-22T14:26:53Z","body":"Hi @aledeg, thank you for taking the time to report this problem! Could you please upload a fork of symfony-standard that reproduces your problem?"}}