Find a Rector rule
Find the best Rector rule to solve your problem. Searching through 1005 rules.
Found 1 rule. That's the one: Clear
symfony/doctrine-bridge
1 match
ParamConverterAttributeToMapEntityAttributeRector
symfony/doctrine-bridge >=6.2
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
) {
}
}