File tree 2 files changed +2
-14
lines changed
2 files changed +2
-14
lines changed Original file line number Diff line number Diff line change 14
14
use Symfony \Component \VarDumper \Cloner \Data ;
15
15
use Symfony \Component \VarDumper \Dumper \HtmlDumper ;
16
16
use Twig \Environment ;
17
- use Twig \Extension \EscaperExtension ;
18
17
use Twig \Extension \ProfilerExtension ;
19
18
use Twig \Profiler \Profile ;
20
19
use Twig \Runtime \EscaperRuntime ;
@@ -109,17 +108,6 @@ public function getName(): string
109
108
110
109
private static function escape (Environment $ env , string $ s ): string
111
110
{
112
- // Twig 3.10 and above
113
- if (class_exists (EscaperRuntime::class)) {
114
- return $ env ->getRuntime (EscaperRuntime::class)->escape ($ s );
115
- }
116
-
117
- // Twig 3.9
118
- if (method_exists (EscaperExtension::class, 'escape ' )) {
119
- return EscaperExtension::escape ($ env , $ s );
120
- }
121
-
122
- // to be removed when support for Twig 3 is dropped
123
- return twig_escape_filter ($ env , $ s );
111
+ return $ env ->getRuntime (EscaperRuntime::class)->escape ($ s );
124
112
}
125
113
}
Original file line number Diff line number Diff line change 22
22
"symfony/http-kernel" : " ^6.4|^7.0" ,
23
23
"symfony/routing" : " ^6.4|^7.0" ,
24
24
"symfony/twig-bundle" : " ^6.4|^7.0" ,
25
- "twig/twig" : " ^3.0.4 "
25
+ "twig/twig" : " ^3.10 "
26
26
},
27
27
"require-dev" : {
28
28
"symfony/browser-kit" : " ^6.4|^7.0" ,
You can’t perform that action at this time.
0 commit comments