mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-20 14:36:57 +00:00
Remove MacroAutoImportNodeVisitor
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
# 3.15.0 (2024-XX-XX)
|
# 3.15.0 (2024-XX-XX)
|
||||||
|
|
||||||
* Deprecate `MacroAutoImportNodeVisitor`
|
* Remove `MacroAutoImportNodeVisitor`
|
||||||
* Deprecate `MethodCallExpression` in favor of `MacroReferenceExpression`
|
* Deprecate `MethodCallExpression` in favor of `MacroReferenceExpression`
|
||||||
* Fix support for the "is defined" test on `_self.xxx` (auto-imported) macros
|
* Fix support for the "is defined" test on `_self.xxx` (auto-imported) macros
|
||||||
* Fix support for the "is defined" test on inherited macros
|
* Fix support for the "is defined" test on inherited macros
|
||||||
|
|||||||
@@ -184,9 +184,6 @@ Node Visitors
|
|||||||
deprecated as of Twig 3.12 and will be removed in Twig 4.0; they don't do
|
deprecated as of Twig 3.12 and will be removed in Twig 4.0; they don't do
|
||||||
anything anymore.
|
anything anymore.
|
||||||
|
|
||||||
* The ``Twig\NodeVisitor\MacroAutoImportNodeVisitor`` class is deprecated as of
|
|
||||||
Twig 3.15.
|
|
||||||
|
|
||||||
Parser
|
Parser
|
||||||
------
|
------
|
||||||
|
|
||||||
|
|||||||
@@ -1,44 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
/*
|
|
||||||
* This file is part of Twig.
|
|
||||||
*
|
|
||||||
* (c) Fabien Potencier
|
|
||||||
*
|
|
||||||
* For the full copyright and license information, please view the LICENSE
|
|
||||||
* file that was distributed with this source code.
|
|
||||||
*/
|
|
||||||
|
|
||||||
namespace Twig\NodeVisitor;
|
|
||||||
|
|
||||||
use Twig\Environment;
|
|
||||||
use Twig\Node\Node;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author Fabien Potencier <fabien@symfony.com>
|
|
||||||
*
|
|
||||||
* @internal
|
|
||||||
*/
|
|
||||||
final class MacroAutoImportNodeVisitor implements NodeVisitorInterface
|
|
||||||
{
|
|
||||||
public function __construct()
|
|
||||||
{
|
|
||||||
trigger_deprecation('twig/twig', '3.15', 'The "%s" class is deprecated.', __CLASS__);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function enterNode(Node $node, Environment $env): Node
|
|
||||||
{
|
|
||||||
return $node;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function leaveNode(Node $node, Environment $env): Node
|
|
||||||
{
|
|
||||||
return $node;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getPriority(): int
|
|
||||||
{
|
|
||||||
// we must be ran before auto-escaping
|
|
||||||
return -10;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user