From 27a06be851c41d4a67c78c1fa63c47892823d620 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Tue, 23 Jul 2024 11:06:19 +0200 Subject: [PATCH] drop type-hints for properties where the Type constraint is used --- reference/constraints/Type.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/reference/constraints/Type.rst b/reference/constraints/Type.rst index f10d1423997..732247e0b5a 100644 --- a/reference/constraints/Type.rst +++ b/reference/constraints/Type.rst @@ -33,19 +33,19 @@ This will check if ``emailAddress`` is an instance of ``Symfony\Component\Mime\A class Author { #[Assert\Type(Address::class)] - protected Address $emailAddress; + protected $emailAddress; #[Assert\Type('string')] - protected string $firstName; + protected $firstName; #[Assert\Type( type: 'integer', message: 'The value {{ value }} is not a valid {{ type }}.', )] - protected int $age; + protected $age; #[Assert\Type(type: ['alpha', 'digit'])] - protected string $accessCode; + protected $accessCode; } .. code-block:: yaml