Skip to content

Commit 1836ad5

Browse files
committed
bug #1861 Fix InvoiceCreator demo (WebMamba)
This PR was merged into the 2.x branch. Discussion ---------- Fix InvoiceCreator demo | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | Issues | Fix slack: https://symfony-devs.slack.com/archives/C01FN4EQNLX/p1716282168599679 | License | MIT Looks like a regression occurred in #[LiveArg]. I need to dig more on this but let's fix that first Commits ------- 1e23d94 Fix InvoiceCreator demo
2 parents b25c065 + 1e23d94 commit 1836ad5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ux.symfony.com/src/Twig/InvoiceCreator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,14 +83,14 @@ public function onLineItemEditModeChange(#[LiveArg] int $key, #[LiveArg] $isEdit
8383
}
8484

8585
#[LiveListener('line_item:save')]
86-
public function saveLineItem(#[LiveArg] int $key, #[LiveArg] Product $product, #[LiveArg] int $quantity): void
86+
public function saveLineItem(#[LiveArg] int $key, #[LiveArg] int $product, #[LiveArg] int $quantity): void
8787
{
8888
if (!isset($this->lineItems[$key])) {
8989
// shouldn't happen
9090
return;
9191
}
9292

93-
$this->lineItems[$key]['productId'] = $product->getId();
93+
$this->lineItems[$key]['productId'] = $product;
9494
$this->lineItems[$key]['quantity'] = $quantity;
9595
}
9696

0 commit comments

Comments
 (0)