mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-04 22:47:21 +00:00
Fix raw filter compat
This commit is contained in:
@@ -25,6 +25,13 @@ class FilterExpression extends CallExpression
|
||||
public function compile(Compiler $compiler): void
|
||||
{
|
||||
$name = $this->getNode('filter')->getAttribute('value');
|
||||
if ('raw' === $name) {
|
||||
trigger_deprecation('twig/twig', '3.11', 'Creating the "raw" filter via "FilterExpression" is deprecated; use "RawFilter" instead.');
|
||||
|
||||
$compiler->subcompile($this->getNode('node'));
|
||||
|
||||
return;
|
||||
}
|
||||
$filter = $compiler->getEnvironment()->getFilter($name);
|
||||
|
||||
$this->setAttribute('name', $name);
|
||||
|
||||
Reference in New Issue
Block a user