before recipes:update

This commit is contained in:
2022-05-11 14:48:04 +02:00
parent 1b4ca82754
commit c84ec14cb5
46 changed files with 1363 additions and 1235 deletions

View File

@@ -46,7 +46,7 @@ class QuotesRepository extends ServiceEntityRepository
->select('MIN(q.id)', 'MAX(q.id)')
->getQuery()
->getOneOrNullResult();
$randomPossibleId = rand(min: $idLimits[1], max: $idLimits[2]);
$randomPossibleId = random_int(min: $idLimits[1], max: $idLimits[2]);
return $this->createQueryBuilder(alias: 'q')
->where(predicates: 'q.id >= :random_id')

View File

@@ -45,7 +45,7 @@ class UserRepository extends ServiceEntityRepository implements PasswordUpgrader
public function upgradePassword(PasswordAuthenticatedUserInterface $user, string $newHashedPassword): void
{
if (!$user instanceof User) {
throw new UnsupportedUserException(message: sprintf('Instances of "%s" are not supported.', get_class(object: $user)));
throw new UnsupportedUserException(message: sprintf('Instances of "%s" are not supported.', $user::class));
}
$user->setPassword(password: $newHashedPassword);