@@ -949,11 +949,11 @@ A common routing need is to convert the value stored in some parameter (e.g. an
949949integer acting as the user ID) into another value (e.g. the object that
950950represents the user). This feature is called a "param converter".
951951
952- To add support for "param converters" we need SensioFrameworkExtraBundle:
953-
954- .. code-block :: terminal
952+ .. versionadded :: 6.2
955953
956- $ composer require sensio/framework-extra-bundle
954+ Starting from Symfony 6.2, route param conversion is a built-in feature.
955+ In previous Symfony versions you had to install the package
956+ ``sensio/framework-extra-bundle `` before using this feature.
957957
958958Now, keep the previous route configuration, but change the arguments of the
959959controller action. Instead of ``string $slug ``, add ``BlogPost $post ``::
@@ -984,8 +984,9 @@ this case), the "param converter" makes a database request to find the object
984984using the request parameters (``slug `` in this case). If no object is found,
985985Symfony generates a 404 response automatically.
986986
987- Read the `full param converter documentation `_ to learn about the converters
988- provided by Symfony and how to configure them.
987+ Check out the `Doctrine param conversion documentation <doctrine-entity-value-resolver >`_
988+ to learn about the ``#[MapEntity] `` attribute that can be used to customize the
989+ database queries used to fetch the object from the route parameter.
989990
990991Special Parameters
991992~~~~~~~~~~~~~~~~~~
@@ -2672,5 +2673,4 @@ Learn more about Routing
26722673
26732674.. _`PHP regular expressions` : https://www.php.net/manual/en/book.pcre.php
26742675.. _`PCRE Unicode properties` : https://www.php.net/manual/en/regexp.reference.unicode.php
2675- .. _`full param converter documentation` : https://symfony.com/doc/current/bundles/SensioFrameworkExtraBundle/annotations/converters.html
26762676.. _`FOSJsRoutingBundle` : https://github.com/FriendsOfSymfony/FOSJsRoutingBundle
0 commit comments