From c0b5150929e9229728c41e5ba979ad8f45009abd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20Andr=C3=A9?= Date: Fri, 19 Apr 2024 15:38:50 +0200 Subject: [PATCH] [LiveComponent][TwigComponent] Allow Twig 3.9 --- src/LiveComponent/composer.json | 2 +- src/TwigComponent/src/Twig/ComponentNode.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/LiveComponent/composer.json b/src/LiveComponent/composer.json index 342e2f1593e..720b4fc170b 100644 --- a/src/LiveComponent/composer.json +++ b/src/LiveComponent/composer.json @@ -29,7 +29,7 @@ "php": ">=8.1", "symfony/property-access": "^5.4.5|^6.0|^7.0", "symfony/ux-twig-component": "^2.8", - "twig/twig": "~3.8.0" + "twig/twig": "^3.8.0" }, "require-dev": { "doctrine/annotations": "^1.0", diff --git a/src/TwigComponent/src/Twig/ComponentNode.php b/src/TwigComponent/src/Twig/ComponentNode.php index 2f2ee7444c7..3c46f0e6bde 100644 --- a/src/TwigComponent/src/Twig/ComponentNode.php +++ b/src/TwigComponent/src/Twig/ComponentNode.php @@ -78,7 +78,7 @@ public function compile(Compiler $compiler): void ->raw("\n") ->indent(); if (method_exists(Environment::class, 'useYield')) { - $compiler->write('yield from $preRendered; '); + $compiler->write('yield $preRendered; '); } else { $compiler->write('echo $preRendered; '); }