mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-20 14:36:57 +00:00
Merge branch '2.x' into 3.x
* 2.x: macros imported "globally" in a template are now available in macros without re-importing them added more tests added some tests
This commit is contained in:
@@ -48,7 +48,7 @@ final class FromTokenParser extends AbstractTokenParser
|
||||
$stream->expect(/* Token::BLOCK_END_TYPE */ 3);
|
||||
|
||||
$var = new AssignNameExpression($this->parser->getVarName(), $token->getLine());
|
||||
$node = new ImportNode($macro, $var, $token->getLine(), $this->getTag());
|
||||
$node = new ImportNode($macro, $var, $token->getLine(), $this->getTag(), $this->parser->isMainScope());
|
||||
|
||||
foreach ($targets as $name => $alias) {
|
||||
$this->parser->addImportedSymbol('function', $alias, 'macro_'.$name, $var);
|
||||
|
||||
Reference in New Issue
Block a user