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

Skip to content

Commit 867d8e9

Browse files
committed
add legacy tag to EntityTypeTest - edit upgrade/changelog
1 parent 7504dde commit 867d8e9

File tree

3 files changed

+42
-0
lines changed

3 files changed

+42
-0
lines changed

UPGRADE-4.0.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,44 @@ Form
1414

1515
* The `choices_as_values` option of the `ChoiceType` has been removed.
1616

17+
* The `expanded` option of the `ChoiceType` has been removed.
18+
Use instead the `widget` option with `select`, `checkbox`, `radio`, `text` or `hidden`.
19+
20+
Before:
21+
22+
```php
23+
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
24+
25+
$form = $this->createFormBuilder()
26+
->add('isAttending', ChoiceType::class, array(
27+
'choices' => array(
28+
'Maybe' => null,
29+
'Yes' => true,
30+
'No' => false,
31+
),
32+
'expanded' => true,
33+
'multiple' => true,
34+
))
35+
->getForm();
36+
```
37+
38+
After:
39+
40+
```php
41+
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
42+
43+
$form = $this->createFormBuilder()
44+
->add('isAttending', ChoiceType::class, array(
45+
'choices' => array(
46+
'Maybe' => null,
47+
'Yes' => true,
48+
'No' => false,
49+
),
50+
'widget' => 'checkbox',
51+
))
52+
->getForm();
53+
```
54+
1755
Serializer
1856
----------
1957

src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypeTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@
3434
use Symfony\Bridge\Doctrine\Tests\Fixtures\SingleAssociationToIntIdEntity;
3535
use Symfony\Bridge\Doctrine\Tests\Fixtures\SingleIntIdNoToStringEntity;
3636

37+
/**
38+
* @group legacy
39+
*/
3740
class EntityTypeTest extends TypeTestCase
3841
{
3942
const ITEM_GROUP_CLASS = 'Symfony\Bridge\Doctrine\Tests\Fixtures\GroupableEntity';

src/Symfony/Component/Form/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ CHANGELOG
55
-----
66

77
* deprecated the "choices_as_values" option of ChoiceType
8+
* deprecated the "expanded" option of ChoiceType
89

910
3.0.0
1011
-----

0 commit comments

Comments
 (0)