Skip to content

Commit c7ef41e

Browse files
ytilottijaviereguiluz
authored andcommitted
[Doctrine] Errors on EntityValueResolver exemple
1 parent 4572d7b commit c7ef41e

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

doctrine.rst

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -733,7 +733,7 @@ This can also be used to help resolve multiple arguments::
733733

734734
#[Route('/product/{id}/comments/{comment_id}')]
735735
public function show(
736-
Product $product
736+
Product $product,
737737
#[MapEntity(expr: 'repository.find(comment_id)')]
738738
Comment $comment
739739
): Response {
@@ -755,9 +755,8 @@ control behavior:
755755

756756
#[Route('/product/{product_id}')]
757757
public function show(
758-
Product $product
759758
#[MapEntity(id: 'product_id')]
760-
Comment $comment
759+
Product $product
761760
): Response {
762761
}
763762

@@ -769,7 +768,7 @@ control behavior:
769768
#[Route('/product/{category}/{slug}/comments/{comment_slug}')]
770769
public function show(
771770
#[MapEntity(mapping: ['category' => 'category', 'slug' => 'slug'])]
772-
Product $product
771+
Product $product,
773772
#[MapEntity(mapping: ['comment_slug' => 'slug'])]
774773
Comment $comment
775774
): Response {
@@ -782,7 +781,7 @@ control behavior:
782781
#[Route('/product/{slug}/{date}')]
783782
public function show(
784783
#[MapEntity(exclude: ['date'])]
785-
Product $product
784+
Product $product,
786785
\DateTime $date
787786
): Response {
788787
}

0 commit comments

Comments
 (0)