Fix the exception message to match the expected one for not ready nodes

This commit is contained in:
Christophe Coevoet
2024-11-20 13:36:08 +01:00
parent fd4d580654
commit b15ba0f963
+1 -1
View File
@@ -38,7 +38,7 @@ final class YieldNotReadyNodeVisitor implements NodeVisitorInterface
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);