mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-16 13:44:12 +02:00
[ticket/16654] Upgrade Twig to version 3
PHPBB3-16654
This commit is contained in:
@@ -65,7 +65,7 @@ class event extends \Twig\Node\Node
|
||||
|
||||
// We set the namespace lookup order to be this extension first, then the main path
|
||||
->write("\$this->env->setNamespaceLookUpOrder(array('{$ext_namespace}', '__main__'));\n")
|
||||
->write("\$this->env->loadTemplate('@{$ext_namespace}/{$location}.html')->display(\$context);\n")
|
||||
->write("\$this->env->loadTemplate(\$this->env->getTemplateClass('@{$ext_namespace}/{$location}.html'), '@{$ext_namespace}/{$location}.html')->display(\$context);\n")
|
||||
->write("\$this->env->setNamespaceLookUpOrder(\$previous_look_up_order);\n")
|
||||
;
|
||||
}
|
||||
|
@@ -15,7 +15,7 @@ namespace phpbb\template\twig\node\expression\binary;
|
||||
|
||||
class equalequal extends \Twig\Node\Expression\Binary\AbstractBinary
|
||||
{
|
||||
public function operator(\Twig\Compiler $compiler)
|
||||
public function operator(\Twig\Compiler $compiler) : \Twig\Compiler
|
||||
{
|
||||
return $compiler->raw('===');
|
||||
}
|
||||
|
@@ -15,7 +15,7 @@ namespace phpbb\template\twig\node\expression\binary;
|
||||
|
||||
class notequalequal extends \Twig\Node\Expression\Binary\AbstractBinary
|
||||
{
|
||||
public function operator(\Twig\Compiler $compiler)
|
||||
public function operator(\Twig\Compiler $compiler) : \Twig\Compiler
|
||||
{
|
||||
return $compiler->raw('!==');
|
||||
}
|
||||
|
@@ -20,7 +20,7 @@ class includenode extends \Twig\Node\IncludeNode
|
||||
*
|
||||
* @param \Twig\Compiler A Twig\Compiler instance
|
||||
*/
|
||||
public function compile(\Twig\Compiler $compiler)
|
||||
public function compile(\Twig\Compiler $compiler) : void
|
||||
{
|
||||
$compiler->addDebugInfo($this);
|
||||
|
||||
|
Reference in New Issue
Block a user