Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 27517e3

Browse files
committed
Use entry_type instead of type
1 parent 87fdffa commit 27517e3

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

src/Symfony/Component/Form/Extension/Core/Type/CollectionType.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,8 @@ public function configureOptions(OptionsResolver $resolver)
9292
if (null !== $value) {
9393
@trigger_error('The form option "type" is deprecated since version 2.8 and will be removed in 3.0. Use "entry_type" instead.', E_USER_DEPRECATED);
9494
}
95+
96+
return $value;
9597
};
9698
$entryType = function (Options $options) {
9799
if (null !== $options['type']) {

src/Symfony/Component/Form/Tests/AbstractTableLayoutTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ public function testRest()
195195
public function testCollection()
196196
{
197197
$form = $this->factory->createNamed('names', 'Symfony\Component\Form\Extension\Core\Type\CollectionType', array('a', 'b'), array(
198-
'type' => 'Symfony\Component\Form\Extension\Core\Type\TextType',
198+
'entry_type' => 'Symfony\Component\Form\Extension\Core\Type\TextType',
199199
));
200200

201201
$this->assertWidgetMatchesXpath($form->createView(), array(),
@@ -213,7 +213,7 @@ public function testCollection()
213213
public function testEmptyCollection()
214214
{
215215
$form = $this->factory->createNamed('names', 'Symfony\Component\Form\Extension\Core\Type\CollectionType', array(), array(
216-
'type' => 'Symfony\Component\Form\Extension\Core\Type\TextType',
216+
'entry_type' => 'Symfony\Component\Form\Extension\Core\Type\TextType',
217217
));
218218

219219
$this->assertWidgetMatchesXpath($form->createView(), array(),

src/Symfony/Component/Form/Tests/Extension/Core/Type/CollectionTypeTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public function testLegacyName()
3131
public function testContainsNoChildByDefault()
3232
{
3333
$form = $this->factory->create('Symfony\Component\Form\Extension\Core\Type\CollectionType', null, array(
34-
'type' => 'Symfony\Component\Form\Extension\Core\Type\TextType',
34+
'entry_type' => 'Symfony\Component\Form\Extension\Core\Type\TextType',
3535
));
3636

3737
$this->assertCount(0, $form);
@@ -305,10 +305,10 @@ public function testPrototypeDefaultLabel()
305305
public function testPrototypeData()
306306
{
307307
$form = $this->factory->create('Symfony\Component\Form\Extension\Core\Type\CollectionType', array(), array(
308-
'type' => 'Symfony\Component\Form\Extension\Core\Type\TextType',
309308
'allow_add' => true,
310309
'prototype' => true,
311310
'prototype_data' => 'foo',
311+
'entry_type' => 'Symfony\Component\Form\Extension\Core\Type\TextType',
312312
'entry_options' => array(
313313
'data' => 'bar',
314314
),

0 commit comments

Comments
 (0)