1<?php
2
3/*
4 * This file is part of Twig.
5 *
6 * (c) Fabien Potencier
7 *
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
10 */
11
12use Twig\Environment;
13use Twig\Extension\EscaperExtension;
14use Twig\Node\Node;
15use Twig\Runtime\EscaperRuntime;
16
17/**
18 * @internal
19 *
20 * @deprecated since Twig 3.9
21 */
22function twig_raw_filter($string)
23{
24    trigger_deprecation('twig/twig', '3.9', 'Using the internal "%s" function is deprecated.', __FUNCTION__);
25
26    return $string;
27}
28
29/**
30 * @internal
31 *
32 * @deprecated since Twig 3.9
33 */
34function twig_escape_filter(Environment $env, $string, $strategy = 'html', $charset = null, $autoescape = false)
35{
36    trigger_deprecation('twig/twig', '3.9', 'Using the internal "%s" function is deprecated.', __FUNCTION__);
37
38    return $env->getRuntime(EscaperRuntime::class)->escape($string, $strategy, $charset, $autoescape);
39}
40
41/**
42 * @internal
43 *
44 * @deprecated since Twig 3.9
45 */
46function twig_escape_filter_is_safe(Node $filterArgs)
47{
48    trigger_deprecation('twig/twig', '3.9', 'Using the internal "%s" function is deprecated.', __FUNCTION__);
49
50    return EscaperExtension::escapeFilterIsSafe($filterArgs);
51}
52