From e35ee1a82635e209a209d77173487cdad16957b2 Mon Sep 17 00:00:00 2001 From: Guilherme Ferreira Date: Wed, 17 Aug 2022 23:23:32 +0200 Subject: [PATCH] Inappropriate usage of Parameter Conversion Under the section `Route Groups and Prefixes`, the action `show` seems to make usage of `Parameter Conversion` technique, though there is no reference for the `Post` class in that code snippet. I would suggest to replace the parameter `Post $post` to `string $slug` , matching the URL parameter defined above the method `show`. --- routing.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routing.rst b/routing.rst index 91dabffec75..b41371f42ce 100644 --- a/routing.rst +++ b/routing.rst @@ -1180,7 +1180,7 @@ the common configuration using options when importing the routes. /** * @Route("/{_locale}/posts/{slug}", name="show") */ - public function show(Post $post): Response + public function show(string $slug): Response { // ... }