From 9dd33a109fbb60ac4cc7293c9b6dfcb3d794a625 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Poirier=20Th=C3=A9or=C3=AAt?= Date: Wed, 20 Dec 2023 13:16:26 -0500 Subject: [PATCH] [All] convert annotation to attribute --- .../sonata-integration-bundle/User/Form/Enable2fa.php | 8 ++++---- packages/user-bundle/DTO/Credential.php | 8 ++------ 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/packages/sonata-integration-bundle/User/Form/Enable2fa.php b/packages/sonata-integration-bundle/User/Form/Enable2fa.php index 47ecae17d..b7e366522 100644 --- a/packages/sonata-integration-bundle/User/Form/Enable2fa.php +++ b/packages/sonata-integration-bundle/User/Form/Enable2fa.php @@ -6,10 +6,10 @@ class Enable2fa { - /** - * @Assert\NotBlank - * @Assert\Length(6) - */ + #[ + Assert\NotBlank, + Assert\Length(6) + ] public ?string $code = null; public ?string $totpSecret = null; diff --git a/packages/user-bundle/DTO/Credential.php b/packages/user-bundle/DTO/Credential.php index 316dfcd3a..fbedad166 100644 --- a/packages/user-bundle/DTO/Credential.php +++ b/packages/user-bundle/DTO/Credential.php @@ -6,14 +6,10 @@ class Credential { - /** - * @Assert\NotBlank - */ + #[Assert\NotBlank] private ?string $username = null; - /** - * @Assert\NotBlank - */ + #[Assert\NotBlank] private ?string $password = null; public function getUsername(): ?string