Skip to content

Commit dc08ede

Browse files
Remove things that only work in Forms < 2.8
1 parent 8554cdf commit dc08ede

File tree

4 files changed

+1
-102
lines changed

4 files changed

+1
-102
lines changed

features/interactive.feature

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -72,39 +72,3 @@ Feature: It is possible to interactively fill in a form from the CLI
7272
[color] => blue
7373
)
7474
"""
75-
76-
Scenario: Select a value
77-
When I run the command "form:color_with_choices_as_values" and I provide as input
78-
"""
79-
Blue[enter]
80-
"""
81-
Then the command has finished successfully
82-
And the output should be
83-
"""
84-
Select color [red]:
85-
[red ] Red
86-
[blue ] Blue
87-
[yellow] Yellow
88-
> Array
89-
(
90-
[color] => blue
91-
)
92-
"""
93-
94-
Scenario: Select a value by its underlying data
95-
When I run the command "form:color_with_choices_as_values" and I provide as input
96-
"""
97-
red[enter]
98-
"""
99-
Then the command has finished successfully
100-
And the output should be
101-
"""
102-
Select color [red]:
103-
[red ] Red
104-
[blue ] Blue
105-
[yellow] Yellow
106-
> Array
107-
(
108-
[color] => red
109-
)
110-
"""

test/Form/ColorType.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ public function buildForm(FormBuilderInterface $builder, array $options)
1818
'Blue' => 'blue',
1919
'Yellow' => 'yellow',
2020
],
21+
'choices_as_values' => true,
2122
'data' => 'red',
2223
]);
2324
}

test/Form/ColorWithChoicesAsValuesType.php

Lines changed: 0 additions & 28 deletions
This file was deleted.

test/config.yml

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,6 @@ services:
3434
tags:
3535
- { name: console.command }
3636

37-
color_with_choices_as_values_command:
38-
class: Matthias\SymfonyConsoleForm\Tests\Command\PrintFormDataCommand
39-
arguments:
40-
- Matthias\SymfonyConsoleForm\Tests\Form\ColorWithChoicesAsValuesType
41-
- color_with_choices_as_values
42-
tags:
43-
- { name: console.command }
44-
4537
date_of_birth_command:
4638
class: Matthias\SymfonyConsoleForm\Tests\Command\PrintFormDataCommand
4739
arguments:
@@ -50,36 +42,6 @@ services:
5042
tags:
5143
- { name: console.command }
5244

53-
demo_form_type:
54-
class: Matthias\SymfonyConsoleForm\Tests\Form\DemoType
55-
tags:
56-
- { name: form.type, alias: demo }
57-
58-
color_form_type:
59-
class: Matthias\SymfonyConsoleForm\Tests\Form\ColorType
60-
tags:
61-
- { name: form.type, alias: color }
62-
63-
color_with_choices_as_values_form_type:
64-
class: Matthias\SymfonyConsoleForm\Tests\Form\ColorWithChoicesAsValuesType
65-
tags:
66-
- { name: form.type, alias: color_with_choices_as_values }
67-
68-
name_form_type:
69-
class: Matthias\SymfonyConsoleForm\Tests\Form\NameType
70-
tags:
71-
- { name: form.type, alias: name }
72-
73-
repeated_password_form_type:
74-
class: Matthias\SymfonyConsoleForm\Tests\Form\RepeatedPasswordType
75-
tags:
76-
- { name: form.type, alias: repeated_password }
77-
78-
date_of_birth_form_type:
79-
class: Matthias\SymfonyConsoleForm\Tests\Form\DateOfBirthType
80-
tags:
81-
- { name: form.type, alias: date_of_birth }
82-
8345
framework:
8446
form:
8547
csrf_protection: true

0 commit comments

Comments
 (0)