Skip to content

Commit bf98d39

Browse files
committed
minor #3037 [TwigComponent] Replace Twig comments with PHP comments (Tastaturberuf)
This PR was merged into the 2.x branch. Discussion ---------- [TwigComponent] Replace Twig comments with PHP comments | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | Docs? | yes | Issues | | License | MIT Commits ------- 25b9786 Replace Twig comments with PHP comments
2 parents 0dbdc10 + 25b9786 commit bf98d39

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/TwigComponent/doc/index.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -477,8 +477,8 @@ The following code won't work as expected::
477477

478478
public function mount(): void
479479
{
480-
{# ❌ this won't work: at this point $type still has its default value.
481-
Passed values are not yet available in props. #}
480+
// ❌ this won't work: at this point $type still has its default value.
481+
// Passed values are not yet available in props.
482482
if ('error' === $this->type) {
483483
// ...
484484
}
@@ -493,8 +493,8 @@ untyped and has no default). If you need a prop's value, declare a parameter in
493493

494494
public function mount(string $type): void
495495
{
496-
{# ✅ this works as expected: the $type argument in PHP has the value
497-
passed to the 'type' prop in the Twig template #}
496+
// ✅ this works as expected: the $type argument in PHP has the value
497+
// passed to the 'type' prop in the Twig template
498498
if ('error' === $type) {
499499
// ...
500500
}

0 commit comments

Comments
 (0)