Skip to content

Commit d7f61bc

Browse files
authored
feature #300 [interface] change generateResetToken()
1 parent 487f178 commit d7f61bc

File tree

5 files changed

+13
-11
lines changed

5 files changed

+13
-11
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ find a change that break's semver, please create an issue.*
99

1010
### Feature
1111

12+
- [#300](https://github.com/symfonycasts/reset-password-bundle/pull/300) - [interface] change `generateResetToken()` signature - *@jrushlow*
1213
- [#298](https://github.com/symfonycasts/reset-password-bundle/pull/298) - replace final annotation with final class keyword - *@jrushlow*
1314

1415
## [v1.18.0](https://github.com/symfonycasts/reset-password-bundle/releases/tag/v1.18.0)

UPGRADING.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,16 @@
22

33
ResetPasswordBundle now requires PHP `8.3`+ & Symfony `6.4.5`+
44

5+
## ResetPasswordHelperInterface
6+
7+
- The `$resetRequestLifetime` argument for `generateResetToken()` must exist in
8+
classes that implement the interface.
9+
10+
```diff
11+
- public function generateResetToken(object $user/* , ?int $resetRequestLifetime = null */): ResetPasswordToken;
12+
+ public function generateResetToken(object $user, ?int $resetRequestLifetime = null): ResetPasswordToken;
13+
```
14+
515
## ResetPasswordHelper
616

717
- Class became `@final` in `v1.22.0` and in `v2.0.0` the `@final` annotation was

phpstan-baseline.neon

Lines changed: 0 additions & 7 deletions
This file was deleted.

phpstan.dist.neon

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
includes:
2-
- phpstan-baseline.neon
31
parameters:
42
level: 6
53
bootstrapFiles:

src/ResetPasswordHelperInterface.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ interface ResetPasswordHelperInterface
2828
* and removeResetRequest() can eventually invalidate it by removing it
2929
* from storage.
3030
*
31-
* @param ?int $resetRequestLifetime Override the default (to be added to interface in 2.0)
31+
* @param ?int $resetRequestLifetime Override the default lifetime
3232
*
3333
* @throws ResetPasswordExceptionInterface
3434
*/
35-
public function generateResetToken(object $user/* , ?int $resetRequestLifetime = null */): ResetPasswordToken;
35+
public function generateResetToken(object $user, ?int $resetRequestLifetime = null): ResetPasswordToken;
3636

3737
/**
3838
* Validate a reset request and fetch the user from persistence.

0 commit comments

Comments
 (0)