From 35249ddc3be6be6d7c459a630f5217a2ad028ffb Mon Sep 17 00:00:00 2001 From: Artem Henvald Date: Sat, 22 Jan 2022 00:11:57 +0200 Subject: [PATCH] Add attributes (#17) Co-authored-by: Artem Henvald --- Model/Credentials/CredentialsTrait.php | 1 + Model/Timestampable/TimestampableTrait.php | 2 ++ .../Constraints/Password/PasswordMeetSpecialRequirements.php | 1 + 3 files changed, 4 insertions(+) diff --git a/Model/Credentials/CredentialsTrait.php b/Model/Credentials/CredentialsTrait.php index bd5d4ba..8dd0fc1 100644 --- a/Model/Credentials/CredentialsTrait.php +++ b/Model/Credentials/CredentialsTrait.php @@ -22,6 +22,7 @@ trait CredentialsTrait /** * @ORM\Column(type="datetimetz", nullable=true) */ + #[ORM\Column(type: 'datetimetz', nullable: true)] protected ?\DateTime $credentialsLastChangedAt = null; /** diff --git a/Model/Timestampable/TimestampableTrait.php b/Model/Timestampable/TimestampableTrait.php index 9f103a2..bd62651 100644 --- a/Model/Timestampable/TimestampableTrait.php +++ b/Model/Timestampable/TimestampableTrait.php @@ -23,6 +23,7 @@ trait TimestampableTrait /** * @ORM\Column(type="datetimetz_immutable") */ + #[ORM\Column(type: 'datetimetz_immutable')] protected \DateTimeImmutable $createdAt; /** @@ -30,6 +31,7 @@ trait TimestampableTrait * * @Gedmo\Timestampable(on="update") */ + #[ORM\Column(type: 'datetimetz')] protected \DateTime $updatedAt; /** diff --git a/Validator/Constraints/Password/PasswordMeetSpecialRequirements.php b/Validator/Constraints/Password/PasswordMeetSpecialRequirements.php index 827bee5..aa6f9b0 100644 --- a/Validator/Constraints/Password/PasswordMeetSpecialRequirements.php +++ b/Validator/Constraints/Password/PasswordMeetSpecialRequirements.php @@ -19,6 +19,7 @@ * * @Annotation */ +#[\Attribute] class PasswordMeetSpecialRequirements extends Constraint { public const PASSWORD_DOES_NOT_MEET_SPECIAL_REQUIREMENTS = 'PASSWORD_DOES_NOT_MEET_SPECIAL_REQUIREMENTS';