Skip to content

Commit c979068

Browse files
committed
minor symfony#17200 Inappropriate usage of Parameter Conversion (githubfromgui)
This PR was merged into the 4.4 branch. Discussion ---------- 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`. <!-- If your pull request fixes a BUG, use the oldest maintained branch that contains the bug (see https://symfony.com/releases for the list of maintained branches). If your pull request documents a NEW FEATURE, use the same Symfony branch where the feature was introduced (and `6.x` for features of unreleased versions). --> Commits ------- e35ee1a Inappropriate usage of Parameter Conversion
2 parents 83a4b58 + e35ee1a commit c979068

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

routing.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1180,7 +1180,7 @@ the common configuration using options when importing the routes.
11801180
/**
11811181
* @Route("/{_locale}/posts/{slug}", name="show")
11821182
*/
1183-
public function show(Post $post): Response
1183+
public function show(string $slug): Response
11841184
{
11851185
// ...
11861186
}

0 commit comments

Comments
 (0)