Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 8539612

Browse filesBrowse files
Fix tests
1 parent 23b4935 commit 8539612
Copy full SHA for 8539612

File tree

5 files changed

+43
-42
lines changed
Filter options

5 files changed

+43
-42
lines changed

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

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/Twig/Resources/views/Form/bootstrap_4_layout.html.twig
+1-1Lines 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

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/Twig/Resources/views/Form/bootstrap_base_layout.html.twig
+2-2Lines 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

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/Twig/Resources/views/Form/form_div_layout.html.twig
+3-3Lines 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: 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

Copy file name to clipboardExpand all lines: src/Symfony/Component/Form/Tests/Fixtures/Descriptor/resolved_form_type_1.json
+1Lines 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

Copy file name to clipboardExpand all lines: src/Symfony/Component/Form/Tests/Fixtures/Descriptor/resolved_form_type_1.txt
+36-36Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -2,42 +2,42 @@
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 invalid_message auto_initialize csrf_token_manager
15-
choices trim 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-
invalid_message_parameters
26-
is_empty_callback
27-
label
28-
label_attr
29-
label_format
30-
label_html
31-
label_translation_parameters
32-
mapped
33-
method
34-
post_max_size_message
35-
property_path
36-
required
37-
row_attr
38-
translation_domain
39-
upload_max_size_message
40-
--------------------------- -------------------- ------------------------------ -----------------------
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 invalid_message auto_initialize csrf_token_manager
15+
choice_value trim 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+
invalid_message_parameters
26+
is_empty_callback
27+
label
28+
label_attr
29+
label_format
30+
label_html
31+
label_translation_parameters
32+
mapped
33+
method
34+
post_max_size_message
35+
property_path
36+
required
37+
row_attr
38+
translation_domain
39+
upload_max_size_message
40+
------------------------------- -------------------- ------------------------------ -----------------------
4141

4242
Parent types
4343
------------

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.