Skip to content

Commit 3930870

Browse files
committed
bug #263 chore: fix type cast in ResetPasswordRequestRepositoryTrait when using declare(strict_types=1); (Crovitche-1623)
This PR was merged into the main branch. Discussion ---------- chore: fix type cast in `ResetPasswordRequestRepositoryTrait` when using `declare(strict_types=1);` When using `declare(strict_types=1);` in `ResetPasswordRequestRepositoryTrait`, an error occurs on the token generation because the `getSingleIdentifierValue` method returns a scalar value (in my case an integer because I'm using auto-incremented integers) instead of a string as required by the method. Commits ------- f3f9057 chore: fix type cast when using `declare(strict_types=1);`
2 parents 435c65f + f3f9057 commit 3930870

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Persistence/Repository/ResetPasswordRequestRepositoryTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ trait ResetPasswordRequestRepositoryTrait
2222
{
2323
public function getUserIdentifier(object $user): string
2424
{
25-
return $this->getEntityManager()
25+
return (string) $this->getEntityManager()
2626
->getUnitOfWork()
2727
->getSingleIdentifierValue($user)
2828
;

0 commit comments

Comments
 (0)