diff --git a/src/Twig/FaNode.php b/src/Twig/FaNode.php index a34bf8e..ba6b9c3 100644 --- a/src/Twig/FaNode.php +++ b/src/Twig/FaNode.php @@ -7,7 +7,9 @@ use Twig\Attribute\YieldReady; use Twig\Compiler; use Twig\Node\Node; +use Twig\Node\TextNode; +/** @deprecated use {@see TextNode} instead. */ #[YieldReady] final class FaNode extends Node { diff --git a/src/Twig/FaTokenParser.php b/src/Twig/FaTokenParser.php index b7a8aa6..9a9cb4c 100644 --- a/src/Twig/FaTokenParser.php +++ b/src/Twig/FaTokenParser.php @@ -5,7 +5,7 @@ namespace Rabus\TwigAwesomeBundle\Twig; use Rabus\TwigAwesomeBundle\IconLocator; -use Twig\Node\Node; +use Twig\Node\TextNode; use Twig\Token; use Twig\TokenParser\AbstractTokenParser; @@ -16,7 +16,7 @@ public function __construct( ) { } - public function parse(Token $token): Node + public function parse(Token $token): TextNode { $stream = $this->parser->getStream(); @@ -32,7 +32,7 @@ public function parse(Token $token): Node ); $stream->expect(Token::BLOCK_END_TYPE); - return new FaNode($this->iconLocator->getSvg($collection, $faId), $token->getLine(), $this->getTag()); + return new TextNode($this->iconLocator->getSvg($collection, $faId), $token->getLine()); } public function getTag(): string