Skip to content

Commit b5f4726

Browse files
authored
Allow using PHP 8 attributes for doctrine entities
1 parent 209eed3 commit b5f4726

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Model/ResetPasswordRequestTrait.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
namespace SymfonyCasts\Bundle\ResetPassword\Model;
1111

12+
use Doctrine\DBAL\Types\Types;
1213
use Doctrine\ORM\Mapping as ORM;
1314

1415
/**
@@ -20,21 +21,25 @@ trait ResetPasswordRequestTrait
2021
/**
2122
* @ORM\Column(type="string", length=20)
2223
*/
24+
#[ORM\Column(type: Types::STRING, length: 20)]
2325
private $selector;
2426

2527
/**
2628
* @ORM\Column(type="string", length=100)
2729
*/
30+
#[ORM\Column(type: Types::STRING, length: 100)]
2831
private $hashedToken;
2932

3033
/**
3134
* @ORM\Column(type="datetime_immutable")
3235
*/
36+
#[ORM\Column(type: Types::DATETIME_IMMUTABLE)]
3337
private $requestedAt;
3438

3539
/**
3640
* @ORM\Column(type="datetime_immutable")
3741
*/
42+
#[ORM\Column(type: Types::DATETIME_IMMUTABLE)]
3843
private $expiresAt;
3944

4045
private function initialize(\DateTimeInterface $expiresAt, string $selector, string $hashedToken)

0 commit comments

Comments
 (0)