change how ids are generated

from uniquid to hex of random bytes
This commit is contained in:
Yisroel Baum 2025-11-18 09:05:55 +02:00
parent 50fcdcaa28
commit e79064d909
Signed by: yisroelbaum
GPG key ID: 0FA60884F75520A9

View file

@ -45,9 +45,9 @@ class FakeBidRepository implements BidRepository
private function getUniqueId(): string
{
$id = uniqid('', true);
$id = bin2hex(random_bytes(10));
while ($this->find($id) !== null) {
$id = uniqid('', true);
$id = bin2hex(random_bytes(10));
}
return $id;
}