Skip to content

Commit bdb5bc3

Browse files
committed
minor #1960 [TwigComponent] allow attributes to be prefixed with @ (kbond)
This PR was merged into the 2.x branch. Discussion ---------- [TwigComponent] allow attributes to be prefixed with `@` | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | Issues | Fix (partial) #1839 | License | MIT Allow attributes to be prefixed with `@` (like ``@click`="!open"`). Commits ------- c567cbb fix: allow attributes to be prefixed with `@`
2 parents fa3f0c6 + c567cbb commit bdb5bc3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/TwigComponent/tests/Integration/ComponentExtensionTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -331,15 +331,15 @@ public function testRenderingHtmlSyntaxComponentWithNestedAttributes(): void
331331

332332
$output = self::getContainer()
333333
->get(Environment::class)
334-
->createTemplate('<twig:NestedAttributes class="foo" title:class="bar" title:span:class="baz" inner:class="foo" />')
334+
->createTemplate('<twig:NestedAttributes class="foo" title:class="bar" title:span:class="baz" inner:class="foo" inner:@class="qux" @class="vex" />')
335335
->render()
336336
;
337337

338338
$this->assertSame(<<<HTML
339-
<main class="foo">
339+
<main class="foo" @class="vex">
340340
<div class="bar">
341341
<span class="baz">
342-
<div class="foo"/>
342+
<div class="foo" @class="qux"/>
343343
344344
</span>
345345
</div>

0 commit comments

Comments
 (0)