diff --git a/src/Symfony/Component/Form/Extension/Core/Type/CollectionType.php b/src/Symfony/Component/Form/Extension/Core/Type/CollectionType.php index 7de18e013ae0..a74ef226e152 100644 --- a/src/Symfony/Component/Form/Extension/Core/Type/CollectionType.php +++ b/src/Symfony/Component/Form/Extension/Core/Type/CollectionType.php @@ -92,6 +92,8 @@ public function configureOptions(OptionsResolver $resolver) 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']) { diff --git a/src/Symfony/Component/Form/Tests/AbstractTableLayoutTest.php b/src/Symfony/Component/Form/Tests/AbstractTableLayoutTest.php index 7cb44ade6b19..9902a6dc089f 100644 --- a/src/Symfony/Component/Form/Tests/AbstractTableLayoutTest.php +++ b/src/Symfony/Component/Form/Tests/AbstractTableLayoutTest.php @@ -195,7 +195,7 @@ public function testRest() 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 @@ public function testCollection() 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(), diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/Type/CollectionTypeTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/Type/CollectionTypeTest.php index cc00945f913e..82faa71510a6 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/CollectionTypeTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/CollectionTypeTest.php @@ -31,7 +31,7 @@ public function testLegacyName() 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 @@ public function testPrototypeDefaultLabel() 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', ),