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 49c02b4

Browse filesBrowse files
Avoid BC-break
1 parent 8539612 commit 49c02b4
Copy full SHA for 49c02b4

File tree

3 files changed

+12
-6
lines changed
Filter options

3 files changed

+12
-6
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
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,9 +199,10 @@
199199
{% block choice_widget_expanded -%}
200200
<div {{ block('widget_container_attributes') }}>
201201
{%- for child in form %}
202+
{# NEXT_MAJOR: Use default([]) for choice_translation_parameters #}
202203
{{- form_widget(child, {
203204
parent_label_class: label_attr.class|default(''),
204-
label_translation_parameters: choice_translation_parameters|default([]),
205+
label_translation_parameters: choice_translation_parameters|default(label_translation_parameters),
205206
translation_domain: choice_translation_domain,
206207
valid: valid,
207208
}) -}}

‎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
+4-2Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,18 +151,20 @@
151151
{% block choice_widget_expanded -%}
152152
{%- if '-inline' in label_attr.class|default('') -%}
153153
{%- for child in form %}
154+
{# NEXT_MAJOR: Use default([]) for choice_translation_parameters #}
154155
{{- form_widget(child, {
155156
parent_label_class: label_attr.class|default(''),
156-
label_translation_parameters: choice_translation_parameters|default([]),
157+
label_translation_parameters: choice_translation_parameters|default(label_translation_parameters),
157158
translation_domain: choice_translation_domain,
158159
}) -}}
159160
{% endfor -%}
160161
{%- else -%}
161162
<div {{ block('widget_container_attributes') }}>
162163
{%- for child in form %}
164+
{# NEXT_MAJOR: Use default([]) for choice_translation_parameters #}
163165
{{- form_widget(child, {
164166
parent_label_class: label_attr.class|default(''),
165-
label_translation_parameters: choice_translation_parameters|default([]),
167+
label_translation_parameters: choice_translation_parameters|default(label_translation_parameters),
166168
translation_domain: choice_translation_domain,
167169
}) -}}
168170
{%- 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
+6-3Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@
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|default([]), translation_domain: choice_translation_domain}) -}}
53+
{# NEXT_MAJOR: Use default([]) for choice_translation_parameters #}
54+
{{- form_label(child, null, {label_translation_parameters: choice_translation_parameters|default(label_translation_parameters), translation_domain: choice_translation_domain}) -}}
5455
{% endfor -%}
5556
</div>
5657
{%- endblock choice_widget_expanded -%}
@@ -80,12 +81,14 @@
8081
{%- block choice_widget_options -%}
8182
{% for group_label, choice in options %}
8283
{%- if choice is iterable -%}
83-
<optgroup label="{{ choice_translation_domain is same as(false) ? group_label : group_label|trans(choice_translation_parameters|default([]), choice_translation_domain) }}">
84+
{# NEXT_MAJOR: Use default([]) for choice_translation_parameters #}
85+
<optgroup label="{{ choice_translation_domain is same as(false) ? group_label : group_label|trans(choice_translation_parameters|default(label_translation_parameters), choice_translation_domain) }}">
8486
{% set options = choice %}
8587
{{- block('choice_widget_options') -}}
8688
</optgroup>
8789
{%- 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|default([]), choice_translation_domain) }}</option>
90+
{# NEXT_MAJOR: Use default([]) for choice_translation_parameters #}
91+
<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(label_translation_parameters), choice_translation_domain) }}</option>
8992
{%- endif -%}
9093
{% endfor %}
9194
{%- endblock choice_widget_options -%}

0 commit comments

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