Skip to content

[Validator] Add the format option to the Ulid constraint to allow accepting different ULID formats #57438

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
Jun 25, 2024

Conversation

alexandre-daubois
Copy link
Member

@alexandre-daubois alexandre-daubois commented Jun 18, 2024

Q A
Branch? 7.2
Bug fix? no
New feature? yes
Deprecations? no
Issues -
License MIT

Related to #51540 and #57398

@alexandre-daubois alexandre-daubois force-pushed the ulid-base58 branch 2 times, most recently from ec0c7c0 to 66e7a97 Compare June 18, 2024 08:46
@stof stof changed the title [Validator] Add Ulid::VALIDATE_BASE_32 and Ulid::VALIDATE_BASE_58 to the Uuid constraint [Validator] Add Ulid::FORMAT_BASE_32 and Ulid::FORMAT_BASE_58 to the Uuid constraint Jun 18, 2024
@alexandre-daubois alexandre-daubois changed the title [Validator] Add Ulid::FORMAT_BASE_32 and Ulid::FORMAT_BASE_58 to the Uuid constraint [Validator] Add the format option to the Uuid constraint to allow accepting different ULID formats Jun 18, 2024
@alexandre-daubois alexandre-daubois force-pushed the ulid-base58 branch 2 times, most recently from febb9b7 to f5e05a4 Compare June 18, 2024 09:27
@alexandre-daubois alexandre-daubois changed the title [Validator] Add the format option to the Uuid constraint to allow accepting different ULID formats [Validator] Add the format option to the Ulid constraint to allow accepting different ULID formats Jun 19, 2024
@nicolas-grekas
Copy link
Member

IIUC, this doesn't fix #57398, which is about allowing base58 UUIDs. Did I miss something?

@alexandre-daubois
Copy link
Member Author

That's right, I think I mixed up the issues. But I guess this opens up the way to accepting multiple formats in Uuid and Ulid constraints. I guess it would worth on or two follow-up PRs:

  • Supporting RFC4122 in Ulid
  • Supporting Base58 in Uuid

What do you think?

@nicolas-grekas
Copy link
Member

Apparently there is a need for that yes :)

@nicolas-grekas
Copy link
Member

Thank you @alexandre-daubois.

@nicolas-grekas nicolas-grekas merged commit 2cb470e into symfony:7.2 Jun 25, 2024
5 of 10 checks passed
nicolas-grekas added a commit that referenced this pull request Aug 7, 2024
…d` constraint (alexandre-daubois)

This PR was merged into the 7.2 branch.

Discussion
----------

[Validator] Add support for RFC4122 format in the `Ulid` constraint

| Q             | A
| ------------- | ---
| Branch?       | 7.2
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Issues        | Fix #51540
| License       | MIT

Related to #57438 (comment). I did not add new line in the CHANGELOG intentionally, I think the one added in #57438 is enough.

Commits
-------

9382d71 [Validator] Add support for RFC4122 format in the `Ulid` constraint
@fabpot fabpot mentioned this pull request Oct 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants