Skip to content

Commit

Permalink
Fix the exception message to match the expected one for not ready nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
stof committed Nov 20, 2024
1 parent fd4d580 commit b15ba0f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/NodeVisitor/YieldNotReadyNodeVisitor.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public function enterNode(Node $node, Environment $env): Node

if (!$this->yieldReadyNodes[$class] = (bool) (new \ReflectionClass($class))->getAttributes(YieldReady::class)) {
if ($this->useYield) {
throw new \LogicException(\sprintf('You cannot enable the "use_yield" option of Twig as node "%s" is not marked as ready for it; please make it ready and then flag it with the #[YieldReady] attribute.', $class));
throw new \LogicException(\sprintf('You cannot enable the "use_yield" option of Twig as node "%s" is not marked as ready for it; please make it ready and then flag it with the #[\Twig\Attribute\YieldReady] attribute.', $class));
}

trigger_deprecation('twig/twig', '3.9', 'Twig node "%s" is not marked as ready for using "yield" instead of "echo"; please make it ready and then flag it with the #[\Twig\Attribute\YieldReady] attribute.', $class);
Expand Down

0 comments on commit b15ba0f

Please sign in to comment.