summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Roach <greg@subaqua.co.uk>2025-06-03 21:55:30 +0100
committerGreg Roach <greg@subaqua.co.uk>2025-06-03 22:08:54 +0100
commitd40fe4560b74a5a3128ba206904a4cf1dd682398 (patch)
tree110c3ecf440716b03183ed68827d082375ce8a08
parent88450845f761ea63b0ad1153089dee5bc1a96d38 (diff)
downloadwebtrees-d40fe4560b74a5a3128ba206904a4cf1dd682398.tar.gz
webtrees-d40fe4560b74a5a3128ba206904a4cf1dd682398.tar.bz2
webtrees-d40fe4560b74a5a3128ba206904a4cf1dd682398.zip
Fix: #5151 - use UUIDv7 instead of UUIDv4
-rw-r--r--app/Factories/IdFactory.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/Factories/IdFactory.php b/app/Factories/IdFactory.php
index 35e45a4801..6e65784cbb 100644
--- a/app/Factories/IdFactory.php
+++ b/app/Factories/IdFactory.php
@@ -20,8 +20,8 @@ declare(strict_types=1);
namespace Fisharebest\Webtrees\Factories;
use Fisharebest\Webtrees\Contracts\IdFactoryInterface;
-use Ramsey\Uuid\Exception\RandomSourceException;
use Ramsey\Uuid\Uuid;
+use Throwable;
use function hexdec;
use function sprintf;
@@ -40,8 +40,8 @@ class IdFactory implements IdFactoryInterface
{
try {
return strtolower(Uuid::uuid4()->toString());
- } catch (RandomSourceException $ex) {
- // uuid4() can fail if there is insufficient entropy in the system.
+ } catch (Throwable $ex) {
+ // uuid7() can fail for various reasons.
return '';
}
}