From da268876418c93274650eca08306c07ac9e15931 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Fri, 16 Dec 2022 13:00:40 +0100 Subject: [PATCH 1/2] [Doctrine] Fix an example of MapEntity --- doctrine.rst | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/doctrine.rst b/doctrine.rst index b75fdea7c87..f1a9ede902a 100644 --- a/doctrine.rst +++ b/doctrine.rst @@ -755,8 +755,7 @@ control behavior: #[Route('/product/{product_id}')] public function show( - Product $product - #[MapEntity(id: 'product_id')] + #[MapEntity(id: 'product_id')] Product $product Comment $comment ): Response { } From 553c53cb74faf68ab18629e32f1cb0ee111654ea Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Fri, 16 Dec 2022 13:06:06 +0100 Subject: [PATCH 2/2] Fix code syntax --- doctrine.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doctrine.rst b/doctrine.rst index f1a9ede902a..c5745400a63 100644 --- a/doctrine.rst +++ b/doctrine.rst @@ -755,7 +755,7 @@ control behavior: #[Route('/product/{product_id}')] public function show( - #[MapEntity(id: 'product_id')] Product $product + #[MapEntity(id: 'product_id')] Product $product, Comment $comment ): Response { } @@ -768,7 +768,7 @@ control behavior: #[Route('/product/{category}/{slug}/comments/{comment_slug}')] public function show( #[MapEntity(mapping: ['category' => 'category', 'slug' => 'slug'])] - Product $product + Product $product, #[MapEntity(mapping: ['comment_slug' => 'slug'])] Comment $comment ): Response { @@ -781,7 +781,7 @@ control behavior: #[Route('/product/{slug}/{date}')] public function show( #[MapEntity(exclude: ['date'])] - Product $product + Product $product, \DateTime $date ): Response { }