Skip to content

Commit c5102c8

Browse files
authored
feature #311 [generator] add argument type for userId
1 parent 76edcad commit c5102c8

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

UPGRADING.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,3 +66,12 @@ trait has been dropped - attribute mapping is required.
6666
- Method's `getExpirationMessageKey`, `getExpirationMessageData`, & `getExpiresAtIntervalInstance`
6767
no longer potentially throw a `LogicException`. They now throw a `ResetPasswordRuntimeException`
6868
if an invalid `$generatedAt` timestamp is provided to the class constructor.
69+
70+
## ResetPasswordTokenGenerator
71+
72+
- Type added for `createToken()`'s `$userId` argument
73+
74+
```diff
75+
- public function createToken(\DateTimeInterface $expiresAt, $userId, ?string $verifier = null): ResetPasswordTokenComponents
76+
+ public function createToken(\DateTimeInterface $expiresAt, int|string $userId, ?string $verifier = null): ResetPasswordTokenComponents
77+
```

src/Generator/ResetPasswordTokenGenerator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public function __construct(
3636
* @param int|string $userId Unique user identifier
3737
* @param ?string $verifier Only required for token comparison
3838
*/
39-
public function createToken(\DateTimeInterface $expiresAt, $userId, ?string $verifier = null): ResetPasswordTokenComponents
39+
public function createToken(\DateTimeInterface $expiresAt, int|string $userId, ?string $verifier = null): ResetPasswordTokenComponents
4040
{
4141
if (null === $verifier) {
4242
$verifier = $this->generator->getRandomAlphaNumStr();

0 commit comments

Comments
 (0)