1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-04-05 00:13:29 +02:00

[ticket/16382] Update Twig_Source

PHPBB3-16382
This commit is contained in:
mrgoldy 2020-02-27 16:33:54 +01:00
parent b823a94124
commit a4b104c1da

View File

@ -15,7 +15,7 @@ namespace phpbb\template\twig;
class lexer extends \Twig_Lexer
{
public function tokenize(\Twig_Source $source)
public function tokenize(\Twig\Source $source)
{
$code = $source->getCode();
$filename = $source->getName();
@ -125,8 +125,8 @@ class lexer extends \Twig_Lexer
// Appends any filters
$code = preg_replace('#{([a-zA-Z0-9_\.]+)(\|[^}]+?)?}#', '{{ $1$2 }}', $code);
// Tokenize \Twig_Source instance
return parent::tokenize(new \Twig_Source($code, $filename));
// Tokenize \Twig\Source instance
return parent::tokenize(new \Twig\Source($code, $filename));
}
/**