Skip to content

Commit d85ca3e

Browse files
committed
minor #17567 [Doctrine] Errors on EntityValueResolver exemple (ytilotti)
This PR was squashed before being merged into the 6.2 branch. Discussion ---------- [Doctrine] Errors on EntityValueResolver exemple Fix exemples on [Automatically Fetching Objects (EntityValueResolver)](https://symfony.com/doc/current/doctrine.html#automatically-fetching-objects-entityvalueresolver). Commits ------- c7ef41e [Doctrine] Errors on EntityValueResolver exemple
2 parents ca9f537 + c7ef41e commit d85ca3e

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)