Use entry_type instead of type
This commit is contained in:
parent
87fdffa0fc
commit
27517e38be
@ -92,6 +92,8 @@ class CollectionType extends AbstractType
|
||||
if (null !== $value) {
|
||||
@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);
|
||||
}
|
||||
|
||||
return $value;
|
||||
};
|
||||
$entryType = function (Options $options) {
|
||||
if (null !== $options['type']) {
|
||||
|
@ -195,7 +195,7 @@ abstract class AbstractTableLayoutTest extends AbstractLayoutTest
|
||||
public function testCollection()
|
||||
{
|
||||
$form = $this->factory->createNamed('names', 'Symfony\Component\Form\Extension\Core\Type\CollectionType', array('a', 'b'), array(
|
||||
'type' => 'Symfony\Component\Form\Extension\Core\Type\TextType',
|
||||
'entry_type' => 'Symfony\Component\Form\Extension\Core\Type\TextType',
|
||||
));
|
||||
|
||||
$this->assertWidgetMatchesXpath($form->createView(), array(),
|
||||
@ -213,7 +213,7 @@ abstract class AbstractTableLayoutTest extends AbstractLayoutTest
|
||||
public function testEmptyCollection()
|
||||
{
|
||||
$form = $this->factory->createNamed('names', 'Symfony\Component\Form\Extension\Core\Type\CollectionType', array(), array(
|
||||
'type' => 'Symfony\Component\Form\Extension\Core\Type\TextType',
|
||||
'entry_type' => 'Symfony\Component\Form\Extension\Core\Type\TextType',
|
||||
));
|
||||
|
||||
$this->assertWidgetMatchesXpath($form->createView(), array(),
|
||||
|
@ -31,7 +31,7 @@ class CollectionTypeTest extends \Symfony\Component\Form\Test\TypeTestCase
|
||||
public function testContainsNoChildByDefault()
|
||||
{
|
||||
$form = $this->factory->create('Symfony\Component\Form\Extension\Core\Type\CollectionType', null, array(
|
||||
'type' => 'Symfony\Component\Form\Extension\Core\Type\TextType',
|
||||
'entry_type' => 'Symfony\Component\Form\Extension\Core\Type\TextType',
|
||||
));
|
||||
|
||||
$this->assertCount(0, $form);
|
||||
@ -305,10 +305,10 @@ class CollectionTypeTest extends \Symfony\Component\Form\Test\TypeTestCase
|
||||
public function testPrototypeData()
|
||||
{
|
||||
$form = $this->factory->create('Symfony\Component\Form\Extension\Core\Type\CollectionType', array(), array(
|
||||
'type' => 'Symfony\Component\Form\Extension\Core\Type\TextType',
|
||||
'allow_add' => true,
|
||||
'prototype' => true,
|
||||
'prototype_data' => 'foo',
|
||||
'entry_type' => 'Symfony\Component\Form\Extension\Core\Type\TextType',
|
||||
'entry_options' => array(
|
||||
'data' => 'bar',
|
||||
),
|
||||
|
Reference in New Issue
Block a user