From 3d38bba7cd7734ba5e47bbaf3362ced7dd21379f Mon Sep 17 00:00:00 2001 From: LALLAHOM Hamdi Date: Thu, 4 Aug 2022 11:58:28 +0200 Subject: [PATCH] Update index.rst (#2015) Replace "Symfony\Component\Serializer\Annotation\Group" by "Symfony\Component\Serializer\Annotation\Groups" --- Resources/doc/index.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Resources/doc/index.rst b/Resources/doc/index.rst index 88690da..fa667d9 100644 --- a/Resources/doc/index.rst +++ b/Resources/doc/index.rst @@ -306,13 +306,13 @@ properties and validator constraints. Take the model class below: .. code-block:: php-annotations - use Symfony\Component\Serializer\Annotation\Group; + use Symfony\Component\Serializer\Annotation\Groups; use Symfony\Component\Validator\Constraints as Assert; class UserDto { /** - * @Group({"default", "create", "update"}) + * @Groups({"default", "create", "update"}) * @Assert\NotBlank(groups={"default", "create"}) */ public string $username; @@ -320,12 +320,12 @@ properties and validator constraints. Take the model class below: .. code-block:: php-attributes - use Symfony\Component\Serializer\Annotation\Group; + use Symfony\Component\Serializer\Annotation\Groups; use Symfony\Component\Validator\Constraints as Assert; class UserDto { - #[Group(["default", "create", "update"]) + #[Groups(["default", "create", "update"]) #[Assert\NotBlank(groups: ["default", "create"]) public string $username; }