Skip to content

Commit 725a1d5

Browse files
committed
Merge branch '6.2' into 6.3
* 6.2: minor fix ci [Validator] remove mention require php 8.1 [Routing[ Mention that param converters are now native
2 parents 419b024 + 43325d0 commit 725a1d5

File tree

6 files changed

+8
-12
lines changed

6 files changed

+8
-12
lines changed

doctrine/events.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ listener in the Symfony application by creating a new service for it and
164164

165165
.. configuration-block::
166166

167-
.. code-block:: attribute
167+
.. code-block:: php-attributes
168168
169169
// src/App/EventListener/SearchIndexer.php
170170
namespace App\EventListener;

reference/constraints/All.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ entry in that array:
2525
2626
use Symfony\Component\Validator\Constraints as Assert;
2727
28-
// IMPORTANT: nested attributes require PHP 8.1 or higher
2928
class User
3029
{
3130
#[Assert\All([

reference/constraints/AtLeastOneOf.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ The following constraints ensure that:
2929
3030
use Symfony\Component\Validator\Constraints as Assert;
3131
32-
// IMPORTANT: nested attributes requires PHP 8.1 or higher
3332
class Student
3433
{
3534
#[Assert\AtLeastOneOf([

reference/constraints/Collection.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ following:
5858
5959
use Symfony\Component\Validator\Constraints as Assert;
6060
61-
// IMPORTANT: nested attributes requires PHP 8.1 or higher
6261
class Author
6362
{
6463
#[Assert\Collection(

reference/constraints/Sequentially.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ You can validate each of these constraints sequentially to solve these issues:
4444
use App\Validator\Constraints as AcmeAssert;
4545
use Symfony\Component\Validator\Constraints as Assert;
4646
47-
// IMPORTANT: nested attributes requires PHP 8.1 or higher
4847
class Place
4948
{
5049
#[Assert\Sequentially([

routing.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -949,11 +949,11 @@ A common routing need is to convert the value stored in some parameter (e.g. an
949949
integer acting as the user ID) into another value (e.g. the object that
950950
represents 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

958958
Now, keep the previous route configuration, but change the arguments of the
959959
controller 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
984984
using the request parameters (``slug`` in this case). If no object is found,
985985
Symfony 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

990991
Special 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

Comments
 (0)