Commit 9ec163b
committed
feature #60475 [Validator] Revert Slug constraint (wouterj)
This PR was merged into the 7.3 branch.
Discussion
----------
[Validator] Revert Slug constraint
| 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](https://en.wikipedia.org/wiki/Clean_URL#Slug) 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.
Commits
-------
5789965 Revert Slug constraintFile tree
5 files changed
+0
-254
lines changed- src/Symfony/Component/Validator
- Constraints
- Tests/Constraints
5 files changed
+0
-254
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
12 | 11 | | |
13 | 12 | | |
14 | 13 | | |
| |||
This file was deleted.
Lines changed: 0 additions & 47 deletions
This file was deleted.
Lines changed: 0 additions & 47 deletions
This file was deleted.
Lines changed: 0 additions & 117 deletions
This file was deleted.
0 commit comments