Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 9ec163b

Browse filesBrowse files
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 constraint
2 parents 422893b + 5789965 commit 9ec163b
Copy full SHA for 9ec163b

File tree

Expand file treeCollapse file tree

5 files changed

+0
-254
lines changed
Filter options
Expand file treeCollapse file tree

5 files changed

+0
-254
lines changed

‎src/Symfony/Component/Validator/CHANGELOG.md

Copy file name to clipboardExpand all lines: src/Symfony/Component/Validator/CHANGELOG.md
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ CHANGELOG
88
* Deprecate defining custom constraints not supporting named arguments
99
* Deprecate passing an array of options to the constructors of the constraint classes, pass each option as a dedicated argument instead
1010
* Add support for ratio checks for SVG files to the `Image` constraint
11-
* Add the `Slug` constraint
1211
* Add support for the `otherwise` option in the `When` constraint
1312
* Add support for multiple fields containing nested constraints in `Composite` constraints
1413
* Add the `stopOnFirstError` option to the `Unique` constraint to validate all elements

‎src/Symfony/Component/Validator/Constraints/Slug.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Validator/Constraints/Slug.php
-42Lines changed: 0 additions & 42 deletions
This file was deleted.

‎src/Symfony/Component/Validator/Constraints/SlugValidator.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Validator/Constraints/SlugValidator.php
-47Lines changed: 0 additions & 47 deletions
This file was deleted.

‎src/Symfony/Component/Validator/Tests/Constraints/SlugTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Validator/Tests/Constraints/SlugTest.php
-47Lines changed: 0 additions & 47 deletions
This file was deleted.

‎src/Symfony/Component/Validator/Tests/Constraints/SlugValidatorTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Validator/Tests/Constraints/SlugValidatorTest.php
-117Lines changed: 0 additions & 117 deletions
This file was deleted.

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.