Remove MacroAutoImportNodeVisitor

This commit is contained in:
Fabien Potencier
2024-10-21 12:09:30 +02:00
parent 72693884c4
commit f1481be00f
3 changed files with 1 additions and 48 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
# 3.15.0 (2024-XX-XX)
* Deprecate `MacroAutoImportNodeVisitor`
* Remove `MacroAutoImportNodeVisitor`
* 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 inherited macros
-3
View File
@@ -184,9 +184,6 @@ Node Visitors
deprecated as of Twig 3.12 and will be removed in Twig 4.0; they don't do
anything anymore.
* The ``Twig\NodeVisitor\MacroAutoImportNodeVisitor`` class is deprecated as of
Twig 3.15.
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;
}
}