Skip to content

Commit 7b8f52d

Browse files
Merge branch '3.4' into 4.0
* 3.4: update test for Twig performance optimizations [WebProfilerBundle] Increase retry delays between toolbarAction ajax calls support sapi_windows_vt100_support for php 7.2+ bumped Symfony version to 3.4.5 updated VERSION for 3.4.4 updated CHANGELOG for 3.4.4 bumped Symfony version to 2.8.35 updated VERSION for 2.8.34 updated CHANGELOG for 2.8.34 bumped Symfony version to 2.7.42 updated VERSION for 2.7.41 update CONTRIBUTORS for 2.7.41 updated CHANGELOG for 2.7.41 [HttpFoundation] Added "null" type on Request::create docblock Don't stop PSR-4 service discovery if a parent class is missing. Allow trans filter to be safe
2 parents 81260f5 + a640103 commit 7b8f52d

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

Resources/views/Form/form_div_layout.html.twig

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,13 @@
271271
{% set label = name|humanize %}
272272
{%- endif -%}
273273
{%- endif -%}
274-
<{{ element|default('label') }}{% if label_attr %}{% with { attr: label_attr } %}{{ block('attributes') }}{% endwith %}{% endif %}>{{ translation_domain is same as(false) ? label : label|trans({}, translation_domain) }}</{{ element|default('label') }}>
274+
<{{ element|default('label') }}{% if label_attr %}{% with { attr: label_attr } %}{{ block('attributes') }}{% endwith %}{% endif %}>
275+
{%- if translation_domain is same as(false) -%}
276+
{{- label -}}
277+
{%- else -%}
278+
{{- label|trans({}, translation_domain) -}}
279+
{%- endif -%}
280+
</{{ element|default('label') }}>
275281
{%- endif -%}
276282
{%- endblock form_label -%}
277283

Tests/Node/TransNodeTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,10 @@ protected function getVariableGetterWithoutStrictCheck($name)
4949

5050
protected function getVariableGetterWithStrictCheck($name)
5151
{
52+
if (Environment::VERSION_ID > 20404) {
53+
return sprintf('(isset($context["%s"]) || array_key_exists("%1$s", $context) ? $context["%1$s"] : (function () { throw new Twig_Error_Runtime(\'Variable "%1$s" does not exist.\', 0, $this->source); })())', $name);
54+
}
55+
5256
if (Environment::MAJOR_VERSION >= 2) {
5357
return sprintf('(isset($context["%s"]) || array_key_exists("%1$s", $context) ? $context["%1$s"] : (function () { throw new Twig_Error_Runtime(\'Variable "%1$s" does not exist.\', 0, $this->getSourceContext()); })())', $name);
5458
}

0 commit comments

Comments
 (0)