Use the apply tag instead of the filter tag

The filter has been deprecated in favor of the apply tag since Twig 2.9,
see https://twig.symfony.com/doc/2.x/tags/filter.html (apply does not
seem to have its own documentation page yet).
This commit is contained in:
Grégoire Paris 2019-04-27 17:12:24 +02:00
parent e10dd789b2
commit 9c11b98d0a
No known key found for this signature in database
GPG Key ID: 24D48B8012B116BF
3 changed files with 4 additions and 4 deletions

View File

@ -20,7 +20,7 @@
"ext-xml": "*", "ext-xml": "*",
"doctrine/common": "~2.4", "doctrine/common": "~2.4",
"fig/link-util": "^1.0", "fig/link-util": "^1.0",
"twig/twig": "^1.35|^2.4.4", "twig/twig": "^1.40|^2.9",
"psr/cache": "~1.0", "psr/cache": "~1.0",
"psr/container": "^1.0", "psr/container": "^1.0",
"psr/link": "^1.0", "psr/link": "^1.0",

View File

@ -19,9 +19,9 @@
<td> <td>
{% if exception.trace|length %} {% if exception.trace|length %}
<pre class="stacktrace"> <pre class="stacktrace">
{%- filter escape('html') -%} {%- apply escape('html') -%}
{{- include('@Twig/Exception/traces.txt.twig', { exception: exception, format: 'html' }, with_context = false) }} {{- include('@Twig/Exception/traces.txt.twig', { exception: exception, format: 'html' }, with_context = false) }}
{% endfilter %} {% endapply %}
</pre> </pre>
{% endif %} {% endif %}
</td> </td>

View File

@ -22,7 +22,7 @@
"symfony/http-foundation": "~2.8|~3.0|~4.0", "symfony/http-foundation": "~2.8|~3.0|~4.0",
"symfony/http-kernel": "^3.3|~4.0", "symfony/http-kernel": "^3.3|~4.0",
"symfony/polyfill-ctype": "~1.8", "symfony/polyfill-ctype": "~1.8",
"twig/twig": "~1.34|~2.4" "twig/twig": "~1.40|~2.9"
}, },
"require-dev": { "require-dev": {
"symfony/asset": "~2.8|~3.0|~4.0", "symfony/asset": "~2.8|~3.0|~4.0",