Skip to content

Commit

Permalink
Use entry_type instead of type
Browse files Browse the repository at this point in the history
  • Loading branch information
wouterj committed Oct 15, 2015
1 parent 87fdffa commit 27517e3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
Expand Up @@ -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']) {
Expand Down
4 changes: 2 additions & 2 deletions src/Symfony/Component/Form/Tests/AbstractTableLayoutTest.php
Expand Up @@ -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(),
Expand All @@ -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(),
Expand Down
Expand Up @@ -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);
Expand Down Expand Up @@ -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',
),
Expand Down

0 comments on commit 27517e3

Please sign in to comment.