Find the best Rector rule to solve your problem. Searching through 675 rules.
Found 1 rule. That's the one:
Replace ParamConverter attribute with mappings with the MapEntity attribute
+use Symfony\Bridge\Doctrine\Attribute\MapEntity;
+
class SomeController
{
- #[ParamConverter('post', options: ['mapping' => ['date' => 'date', 'slug' => 'slug']])]
- #[ParamConverter('comment', options: ['mapping' => ['comment_slug' => 'slug']])]
public function showComment(
+ #[MapEntity(mapping: ['date' => 'date', 'slug' => 'slug'])]
Post $post,
+ #[MapEntity(mapping: ['comment_slug' => 'slug'])]
Comment $comment
) {
}
}