From 0c15930eb4c0a417b9077bd6352107144caf318a Mon Sep 17 00:00:00 2001 From: Andrey Helldar Date: Wed, 8 Apr 2026 13:05:34 +0300 Subject: [PATCH] UUID generation has been moved to a separate class --- src/TrackerRequest.php | 3 +-- src/TrackerUuid.php | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 src/TrackerUuid.php diff --git a/src/TrackerRequest.php b/src/TrackerRequest.php index 38927f7..3ffb8d1 100644 --- a/src/TrackerRequest.php +++ b/src/TrackerRequest.php @@ -5,7 +5,6 @@ namespace DragonCode\RequestTracker; use Closure; -use Ramsey\Uuid\UuidFactory; use Symfony\Component\HttpFoundation\Request; use function in_array; @@ -70,7 +69,7 @@ public function getTraceId(): string return $id; } - return (new UuidFactory)->uuid7()->toString(); + return TrackerUuid::get(); } public function custom(string $header, Closure $callback): static diff --git a/src/TrackerUuid.php b/src/TrackerUuid.php new file mode 100644 index 0000000..1b8d8d6 --- /dev/null +++ b/src/TrackerUuid.php @@ -0,0 +1,15 @@ +uuid7()->toString(); + } +}