Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 9149622

Browse filesBrowse files
committed
[Form] Fixed wrong usages of the "text" type
1 parent da43309 commit 9149622
Copy full SHA for 9149622

File tree

Expand file treeCollapse file tree

2 files changed

+6
-6
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+6
-6
lines changed

‎src/Symfony/Component/Form/Form.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Form/Form.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -910,7 +910,7 @@ public function add($child, $type = null, array $options = array())
910910
$options['auto_initialize'] = false;
911911

912912
if (null === $type && null === $this->config->getDataClass()) {
913-
$type = 'text';
913+
$type = 'Symfony\Component\Form\Extension\Core\Type\TextType';
914914
}
915915

916916
if (null === $type) {

‎src/Symfony/Component/Form/Tests/CompoundFormTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Form/Tests/CompoundFormTest.php
+5-5Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -172,13 +172,13 @@ public function testAddUsingNameAndType()
172172

173173
$this->factory->expects($this->once())
174174
->method('createNamed')
175-
->with('foo', 'text', null, array(
175+
->with('foo', 'Symfony\Component\Form\Extension\Core\Type\TextType', null, array(
176176
'bar' => 'baz',
177177
'auto_initialize' => false,
178178
))
179179
->will($this->returnValue($child));
180180

181-
$this->form->add('foo', 'text', array('bar' => 'baz'));
181+
$this->form->add('foo', 'Symfony\Component\Form\Extension\Core\Type\TextType', array('bar' => 'baz'));
182182

183183
$this->assertTrue($this->form->has('foo'));
184184
$this->assertSame($this->form, $child->getParent());
@@ -191,14 +191,14 @@ public function testAddUsingIntegerNameAndType()
191191

192192
$this->factory->expects($this->once())
193193
->method('createNamed')
194-
->with('0', 'text', null, array(
194+
->with('0', 'Symfony\Component\Form\Extension\Core\Type\TextType', null, array(
195195
'bar' => 'baz',
196196
'auto_initialize' => false,
197197
))
198198
->will($this->returnValue($child));
199199

200200
// in order to make casting unnecessary
201-
$this->form->add(0, 'text', array('bar' => 'baz'));
201+
$this->form->add(0, 'Symfony\Component\Form\Extension\Core\Type\TextType', array('bar' => 'baz'));
202202

203203
$this->assertTrue($this->form->has(0));
204204
$this->assertSame($this->form, $child->getParent());
@@ -211,7 +211,7 @@ public function testAddWithoutType()
211211

212212
$this->factory->expects($this->once())
213213
->method('createNamed')
214-
->with('foo', 'text')
214+
->with('foo', 'Symfony\Component\Form\Extension\Core\Type\TextType')
215215
->will($this->returnValue($child));
216216

217217
$this->form->add('foo');

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.