coopTilleuls / CoopTilleulsForgotPasswordBundle

Provides a "forgot password" complete feature for your API through a Symfony bundle
MIT License
79 stars 25 forks source link

fix: typo in PasswordTokenManager #131

Closed mano-lis closed 11 months ago

mano-lis commented 11 months ago
Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
mano-lis commented 11 months ago

I think there's a typo here. I was using v1.4 but after upgrading to symfony 6.4, the bundles comes with v1.5 and my test explodes. Reason seems to be the deletion of the nullsafe check part l68 in v1.5

$passwordToken->setExpiresAt($expiresAt ?: new \DateTime($this->defaultExpiresIn));
vincentchalamon commented 11 months ago

Good catch! Can you add a non-regression test please?

vincentchalamon commented 11 months ago

Thanks @mano-lis