diff --git a/src/Symfony/Component/Form/Form.php b/src/Symfony/Component/Form/Form.php index a277b580c5..1d177d96b2 100644 --- a/src/Symfony/Component/Form/Form.php +++ b/src/Symfony/Component/Form/Form.php @@ -910,7 +910,7 @@ class Form implements \IteratorAggregate, FormInterface $options['auto_initialize'] = false; if (null === $type && null === $this->config->getDataClass()) { - $type = 'text'; + $type = 'Symfony\Component\Form\Extension\Core\Type\TextType'; } if (null === $type) { diff --git a/src/Symfony/Component/Form/Tests/CompoundFormTest.php b/src/Symfony/Component/Form/Tests/CompoundFormTest.php index a306647234..0a9ed8e670 100644 --- a/src/Symfony/Component/Form/Tests/CompoundFormTest.php +++ b/src/Symfony/Component/Form/Tests/CompoundFormTest.php @@ -172,13 +172,13 @@ class CompoundFormTest extends AbstractFormTest $this->factory->expects($this->once()) ->method('createNamed') - ->with('foo', 'text', null, array( + ->with('foo', 'Symfony\Component\Form\Extension\Core\Type\TextType', null, array( 'bar' => 'baz', 'auto_initialize' => false, )) ->will($this->returnValue($child)); - $this->form->add('foo', 'text', array('bar' => 'baz')); + $this->form->add('foo', 'Symfony\Component\Form\Extension\Core\Type\TextType', array('bar' => 'baz')); $this->assertTrue($this->form->has('foo')); $this->assertSame($this->form, $child->getParent()); @@ -191,14 +191,14 @@ class CompoundFormTest extends AbstractFormTest $this->factory->expects($this->once()) ->method('createNamed') - ->with('0', 'text', null, array( + ->with('0', 'Symfony\Component\Form\Extension\Core\Type\TextType', null, array( 'bar' => 'baz', 'auto_initialize' => false, )) ->will($this->returnValue($child)); // in order to make casting unnecessary - $this->form->add(0, 'text', array('bar' => 'baz')); + $this->form->add(0, 'Symfony\Component\Form\Extension\Core\Type\TextType', array('bar' => 'baz')); $this->assertTrue($this->form->has(0)); $this->assertSame($this->form, $child->getParent()); @@ -211,7 +211,7 @@ class CompoundFormTest extends AbstractFormTest $this->factory->expects($this->once()) ->method('createNamed') - ->with('foo', 'text') + ->with('foo', 'Symfony\Component\Form\Extension\Core\Type\TextType') ->will($this->returnValue($child)); $this->form->add('foo');