Skip to content

Commit

Permalink
[Twig Hooks] Revert adding #YieldReady to the HookNode and remove the…
Browse files Browse the repository at this point in the history
… Symfony's PHPUnit bridge
  • Loading branch information
jakubtobiasz committed Apr 23, 2024
1 parent 169059a commit ed0487c
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 8 deletions.
1 change: 0 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
"symfony/dotenv": "^5.4 || ^6.0",
"symfony/flex": "^2.4",
"symfony/framework-bundle": "^5.4 || ^6.0",
"symfony/phpunit-bridge": "^5.4 || ^6.0",
"symfony/runtime": "^5.4 || ^6.0",
"symfony/translation": "^5.4 || ^6.0",
"symfony/twig-bundle": "^5.4 || ^6.0",
Expand Down
4 changes: 0 additions & 4 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,6 @@
</exclude>
</groups>

<listeners>
<listener class="Symfony\Bridge\PhpUnit\SymfonyTestsListener" />
</listeners>

<extensions>
</extensions>
</phpunit>
4 changes: 1 addition & 3 deletions src/TwigHooks/src/Twig/Node/HookNode.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,10 @@
namespace Sylius\TwigHooks\Twig\Node;

use Sylius\TwigHooks\Twig\Runtime\HooksRuntime;
use Twig\Attribute\YieldReady;
use Twig\Compiler;
use Twig\Node\Expression\ArrayExpression;
use Twig\Node\Node;

#[YieldReady]
final class HookNode extends Node
{
public function __construct (
Expand Down Expand Up @@ -42,7 +40,7 @@ public function compile(Compiler $compiler): void
HooksRuntime::class,
))->raw("\n");

$compiler->raw('yield $hooksRuntime->renderHook(');
$compiler->raw('echo $hooksRuntime->renderHook(');
$compiler->subcompile($this->getNode('name'));
$compiler->raw(', ');
$compiler->subcompile($this->getNode('hook_level_context'));
Expand Down

0 comments on commit ed0487c

Please sign in to comment.