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; '); }