fix: Generate personless IDs with UUID v7#181
Draft
marandaneto wants to merge 2 commits into
Draft
Conversation
|
Reviews (1): Last reviewed commit: "fix: generate personless ids with UUID v..." | Re-trigger Greptile |
marandaneto
commented
Jun 19, 2026
marandaneto
commented
Jun 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
💡 Motivation and Context
Generated personless identifiers should be time-ordered UUID v7 values. The PHP SDK still generated v4 values for personless capture distinct IDs and exception auto-capture fallback IDs.
This PR adds internal UUID v7 generation following the RFC 9562 Unix timestamp layout and uses it for SDK-generated personless
distinct_idvalues. The helper is autoloaded internally without addingUuid::v7()to the public API snapshot.💚 How did you test it?
composer validatecomposer api:checkvendor/bin/phpcs --warning-severity=0 lib/Uuid.php lib/Client.php lib/ExceptionCapture.php test/UuidTest.phpvendor/bin/phpunit --no-coverage test/UuidTest.phpvendor/bin/phpunit --no-coverage test/RequestContextTest.php --filter Personlessvendor/bin/phpunit --no-coverage test/ExceptionPayloadBuilderTest.php --filter testCaptureExceptionWithoutDistinctIdGeneratesUuidAndSetsNoProfilevendor/bin/phpunit --no-coverage test/ExceptionCaptureTest.php --filter testExceptionHandlerUsesCurrentClientContextProperties📝 Checklist
If releasing new changes
pnpm changesetto generate a changeset file🤖 Agent context
Autonomy: Human-driven (agent-assisted)
Implemented by a coding agent from a human request to migrate SDK-generated UUID v4/random IDs to UUID v7. Follow-up review feedback made UUID v7 generation internal rather than public API and documented the RFC 9562 layout / no PHP core UUID v7 API in supported runtimes.