{"issue":{"state":"open","pull_request":{"diff_url":null,"html_url":null,"patch_url":null},"user":{"avatar_url":"https://secure.gravatar.com/avatar/61c1ed29afda785eb8b45a9174bc2470?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"61c1ed29afda785eb8b45a9174bc2470","url":"https://api.github.com/users/Burgov","login":"Burgov","id":417674},"milestone":null,"assignee":null,"labels":[],"updated_at":"2011-11-04T14:42:48Z","comments":3,"closed_at":null,"url":"https://api.github.com/repos/symfony/symfony/issues/2553","body":"I created a form using the form factory which essentially contains only one field:\r\n\r\n```php\r\n$builder = $this->container->get('form.factory')->createBuilder(\r\n\t'email', \r\n\t$person->getEmail()\r\n);\r\n```\r\n\r\nTrying to bind this form to the post triggers the following error:\r\n\r\nWarning: array_replace_recursive() [<a href='function.array-replace-recursive'>function.array-replace-recursive</a>]: Argument #1 is not an array in D:\\workspace\\09_061_Shifter_RAI\\vendor\\symfony\\src\\Symfony\\Component\\Form\\Form.php line 583","html_url":"https://github.com/symfony/symfony/issues/2553","title":"Form::bindRequest will fail on form with only one field","number":2553,"id":2131386,"created_at":"2011-11-03T11:15:26Z"},"action":"created","comment":{"user":{"avatar_url":"https://secure.gravatar.com/avatar/b6ffb4f3fe821e31f69923630dfdebc5?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"b6ffb4f3fe821e31f69923630dfdebc5","url":"https://api.github.com/users/ericclemmons","login":"ericclemmons","id":15182},"updated_at":"2011-11-04T14:42:48Z","url":"https://api.github.com/repos/symfony/symfony/issues/comments/2631596","body":"The fundamental part of the Form component is that it's binding representation via fields to a model.\r\n\r\nWhen you try to create a form using just `email`, you're not working with a model but with a property.\r\n\r\nThe supported use-case would be\r\n\r\n```php\r\n$form = $this->createFormBuilder($person)->add('email', 'email')->getForm();\r\n```\r\n\r\nThere's no need to create an associative array of whitelisted properties, as that's what the DataMapper portion of the form does automatically when bound.\r\n\r\nIf you still believe this is a bug, it's better to ping beberlei about it, as he's the author of this component.\r\n\r\nCheers!","id":2631596,"created_at":"2011-11-04T14:42:48Z"}}