Skip to content

[Routing][Uid] [6.4] Mention RFC 9562 #58329

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Symfony/Component/Routing/Requirement/Requirement.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ enum Requirement
public const POSITIVE_INT = '[1-9][0-9]*';
public const UID_BASE32 = '[0-9A-HJKMNP-TV-Z]{26}';
public const UID_BASE58 = '[1-9A-HJ-NP-Za-km-z]{22}';
public const UID_RFC4122 = '[0-9a-f]{8}(?:-[0-9a-f]{4}){3}-[0-9a-f]{12}';
public const UID_RFC4122 = '[0-9a-f]{8}(?:-[0-9a-f]{4}){3}-[0-9a-f]{12}'; // RFC 9562 obsoleted RFC 4122 but the format is the same
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alexandre-daubois I guess we can add a new constant here as well?!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Definitely! Good idea, here you go #58336

public const ULID = '[0-7][0-9A-HJKMNP-TV-Z]{25}';
public const UUID = '[0-9a-f]{8}-[0-9a-f]{4}-[13-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}';
public const UUID_V1 = '[0-9a-f]{8}-[0-9a-f]{4}-1[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}';
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Component/Uid/AbstractUid.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ public function toBase32(): string
/**
* Returns the identifier as a RFC 9562/4122 case insensitive string.
*
* @see https://tools.ietf.org/html/rfc4122#section-3
* @see https://datatracker.ietf.org/doc/html/rfc9562/#section-4
*
* @example 09748193-048a-4bfb-b825-8528cf74fdc1 (len=36)
*/
Expand Down
4 changes: 2 additions & 2 deletions src/Symfony/Component/Uid/Uuid.php
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,9 @@ public function toBinary(): string
}

/**
* Returns the identifier as a RFC4122 case insensitive string.
* Returns the identifier as a RFC 9562/4122 case insensitive string.
*
* @see https://tools.ietf.org/html/rfc4122#section-3
* @see https://datatracker.ietf.org/doc/html/rfc9562/#section-4
*
* @example 09748193-048a-4bfb-b825-8528cf74fdc1 (len=36)
*/
Expand Down