8000 Form returns array instead of object, despite data_class option being properly set. · Issue #3753 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

Form returns array instead of object, despite data_class option being properly set. #3753

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
umpirsky opened this issue Apr 1, 2012 · 2 comments

Comments

@umpirsky
Copy link
Contributor
umpirsky commented Apr 1, 2012

This happens if second parameter is not passed to $this->container->get('form.factory')->create().

I tried to create a test case for it in Symfony\Component\Form\Tests\FormFactoryTest, but I get Symfony\Component\Form\Exception\FormException: Could not load type "text". Looks like there is no such type of tests, so probably some setup need to be done first.

I think this is critical bug in forms, and it exists for a while now.

@yethee
Copy link
Contributor
yethee commented Apr 1, 2012

Duplicates the issue #3354.

Currently, you can pass data_class option in the third argument of create() method of the factory instead of set this in getDefaultOptions() of your form type.

@webmozart
Copy link
Contributor

Duplicate of #3354.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
0