8000 Fix tests · symfony/symfony@3f1c059 · GitHub
[go: up one dir, main page]

Skip to content

Commit 3f1c059

Browse files
Fix tests
1 parent 4682651 commit 3f1c059

File tree

5 files changed

+42
-41
lines changed

5 files changed

+42
-41
lines changed

src/Symfony/Bridge/Twig/Resources/views/Form/bootstrap_4_layout.html.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@
201201
{%- for child in form %}
202202
{{- form_widget(child, {
203203
parent_label_class: label_attr.class|default(''),
204-
label_translation_parameters: choice_translation_parameters,
204+
label_translation_parameters: choice_translation_parameters|default([]),
205205
translation_domain: choice_translation_domain,
206206
valid: valid,
207207
}) -}}

src/Symfony/Bridge/Twig/Resources/views/Form/bootstrap_base_layout.html.twig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@
153153
{%- for child in form %}
154154
{{- form_widget(child, {
155155
parent_label_class: label_attr.class|default(''),
156-
label_translation_parameters: choice_translation_parameters,
156+
label_translation_parameters: choice_translation_parameters|default([]),
157157
translation_domain: choice_translation_domain,
158158
}) -}}
159159
{% endfor -%}
@@ -162,7 +162,7 @@
162162
{%- for child in form %}
163163
{{- form_widget(child, {
164164
parent_label_class: label_attr.class|default(''),
165-
label_translation_parameters: choice_translation_parameters,
165+
label_translation_parameters: choice_translation_parameters|default([]),
166166
translation_domain: choice_translation_domain,
167167
}) -}}
168168
{%- endfor -%}

src/Symfony/Bridge/Twig/Resources/views/Form/form_div_layout.html.twig

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
<div {{ block('widget_container_attributes') }}>
5151
{%- for child in form %}
5252
{{- form_widget(child) -}}
53-
{{- form_label(child, null, {label_translation_parameters: choice_translation_parameters, translation_domain: choice_translation_domain}) -}}
53+
{{- form_label(child, null, {label_translation_parameters: 10000 choice_translation_parameters|default([]), translation_domain: choice_translation_domain}) -}}
5454
{% endfor -%}
5555
</div>
5656
{%- endblock choice_widget_expanded -%}
@@ -80,12 +80,12 @@
8080
{%- block choice_widget_options -%}
8181
{% for group_label, choice in options %}
8282
{%- if choice is iterable -%}
83-
<optgroup label="{{ choice_translation_domain is same as(false) ? group_label : group_label|trans(choice_translation_parameters, choice_translation_domain) }}">
83+
<optgroup label="{{ choice_translation_domain is same as(false) ? group_label : group_label|trans(choice_translation_parameters|default([]), choice_translation_domain) }}">
8484
{% set options = choice %}
8585
{{- block('choice_widget_options') -}}
8686
</optgroup>
8787
{%- else -%}
88-
<option value="{{ choice.value }}"{% if choice.attr %}{% with { attr: choice.attr } %}{{ block('attributes') }}{% endwith %}{% endif %}{% if not render_preferred_choices|default(false) and choice is selectedchoice(value) %} selected="selected"{% endif %}>{{ choice_translation_domain is same as(false) ? choice.label : choice.label|trans(choice_translation_parameters, choice_translation_domain) }}</option>
88+
<option value="{{ choice.value }}"{% if choice.attr %}{% with { attr: choice.attr } %}{{ block('attributes') }}{% endwith %}{% endif %}{% if not render_preferred_choices|default(false) and choice is selectedchoice(value) %} selected="selected"{% endif %}>{{ choice_translation_domain is same as(false) ? choice.label : choice.label|trans(choice_translation_parameters|default([]), choice_translation_domain) }}</option>
8989
{%- endif -%}
9090
{% endfor %}
9191
{%- endblock choice_widget_options -%}

src/Symfony/Component/Form/Tests/Fixtures/Descriptor/resolved_form_type_1.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"choice_loader",
1010
"choice_name",
1111
"choice_translation_domain",
12+
"choice_translation_parameters",
1213
"choice_value",
1314
"choices",
1415
"expanded",

src/Symfony/Component/Form/Tests/Fixtures/Descriptor/resolved_form_type_1.txt

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -2,41 +2,41 @@
22
Symfony\Component\Form\Extension\Core\Type\ChoiceType (Block prefix: "choice")
33
==============================================================================
44

5-
--------------------------- -------------------- ------------------------------ -----------------------
6-
Options Overridden options Parent options Extension options
7-
--------------------------- -------------------- ------------------------------ -----------------------
8-
choice_attr FormType FormType FormTypeCsrfExtension
9-
choice_filter -------------------- ------------------------------ -----------------------
10-
choice_label compound action csrf_field_name
11-
choice_loader data_class allow_file_upload csrf_message
12-
choice_name empty_data attr csrf_protection
13-
choice_translation_domain error_bubbling attr_translation_parameters csrf_token_id
14-
choice_value trim auto_initialize csrf_token_manager
15-
choices block_name
16-
expanded block_prefix
17-
group_by by_reference
18-
multiple data
19-
placeholder disabled
20-
preferred_choices help
21-
help_attr
22-
help_html
23-
help_translation_parameters
24-
inherit_data
25-
is_empty_callback
26-
label
27-
label_attr
28-
label_format
29-
label_html
30-
label_translation_parameters
31-
mapped
32-
method
33-
post_max_size_message
34-
property_path
35-
required
36-
row_attr
37-
translation_domain
38-
upload_max_size_message
39-
--------------------------- -------------------- ------------------------------ -----------------------
5+
------------------------------- -------------------- ------------------------------ -----------------------
6+
Options Overridden options Parent options Extension options
7+
------------------------------- -------------------- ------------------------------ -----------------------
8+
choice_attr FormType FormType FormTypeCsrfExtension
9+
choice_filter -------------------- ------------------------------ -----------------------
10+
choice_label compound action csrf_field_name
11+
choice_loader data_class allow_file_upload csrf_message
12+
choice_name empty_data attr csrf_protection
13+
choice_translation_domain error_bubbling attr_translation_parameters csrf_token_id
14+
choice_translation_parameters trim auto_initialize csrf_token_manager
15+
choice_value block_name
16+
choices block_prefix
17+
expanded by_reference
18+
group_by data
19+
multiple disabled
20+
placeholder help
21+
preferred_choices help_attr
22+
help_html
23+
help_translation_parameters
24+
inherit_data
25+
is_empty_callback
26+
label
27+
label_attr
28+
label_format
29+
label_html
30+
label_translation_parameters
31+
mapped
32+
method
33+
post_max_size_message
34+
property_path
35+
required
36+
row_attr
37+
translation_domain
38+
upload_max_size_message
39+
------------------------------- -------------------- ------------------------------ -----------------------
4040

4141
Parent types
4242
------------

0 commit comments

Comments
 (0)
0