Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
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 Expand Up @@ -123,6 +125,7 @@ public function configureOptions(OptionsResolver $resolver)
'delete_empty' => false,
));

$resolver->setNormalizer('type', $typeNormalizer);
$resolver->setNormalizer('options', $optionsNormalizer);
$resolver->setNormalizer('entry_options', $entryOptionsNormalizer);
}
Expand Down
4 changes: 2 additions & 2 deletions src/Symfony/Component/Form/Tests/AbstractTableLayoutTest.php
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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