8000 [Validator] Revert Slug constraint by wouterj · Pull Request #60475 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[Validator] Revert Slug constraint #60475

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

Open
wants to merge 1 commit into
base: 7.3
Choose a base branch
from

Conversation

wouterj
Copy link
Member
@wouterj wouterj commented May 19, 2025
Q A
Branch? 7.3
Bug fix? no
New feature? no
Deprecations? no
Issues Reverts #58542
License MIT

After an internal discussion, I think it's best to revert the introduction of the Slug constraint:

  • There is no official standard for slugs, or what a slug means exactly. Within Symfony, it would be best to comply with what our AsciiSlugger is doing, but a more common approach is to only allow lowercase characters.
  • The constraint adds little on top of the existing Regex constraint, especially when using it's regex option to customize the pattern for slugs.

Considering this, I believe it is always better for applications to be clear on what they allow in a slug using the Regex constraint.

@carsonbot carsonbot added this to the 7.3 milestone May 19, 2025
@wouterj
Copy link
Member Author
wouterj commented May 19, 2025

cc @raffaelecarelle, as the original author of the PR. If there is something we're overlooking or you see value in the constraint that I'm missing, please feel free to share it here so we can consider it.

@xabbuh xabbuh added Validator ❄️ Feature Freeze Important Pull Requests to finish before the next Symfony "feature freeze" labels May 19, 2025
@carsonbot carsonbot changed the title Revert Slug constraint [Validator] Revert Slug constraint May 19, 2025
@ajgarlag
Copy link
Contributor
ajgarlag commented May 19, 2025

I think PR #59383 should be reverted too

@94noni
Copy link
Contributor
94noni commented May 19, 2025

Warning

you must also update/amend the corresponding blogpost otherwise ppl will think its a fail of release no ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
❄️ Feature Freeze Important Pull Requests to finish before the next Symfony "feature freeze" Status: Reviewed Validator
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants
0