8000 [Validator] let the `SlugValidator` accept `AsciiSlugger` results by xabbuh · Pull Request #60426 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[Validator] let the SlugValidator accept AsciiSlugger results #60426

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
May 16, 2025

Conversation

xabbuh
Copy link
Member
@xabbuh xabbuh commented May 15, 2025
Q A
Branch? 7.3
Bug fix? no
New feature? no
Deprecations? no
Issues Fix #58542 (comment)
License MIT

@carsonbot carsonbot added this to the 7.3 milestone May 15, 2025
@xabbuh xabbuh added the ❄️ Feature Freeze Important Pull Requests to finish before the next Symfony "feature freeze" label May 15, 2025
@OskarStark OskarStark changed the title [Validator] let the SlugValidator accept AsciiSlugger results [Validator] let the SlugValidator accept AsciiSlugger results May 15, 2025
/**
* @testWith ["PHP"]
* @testWith ["Symfony is cool"]
* @testWith ["Lorem ipsum dolor sit amet"]
Copy link
Member

Choose a reason for hiding this comment

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

Nitpick, you may use only one testWith instead of three, like the other usage above?

Copy link
Member Author

Choose a reason for hiding this comment

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

In fact, it's even required not to repeat the annotation.

Copy link
Member Author

Choose a reason for hiding this comment

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

Before:

$ php ./phpunit src/Symfony/Component/Validator/Tests/Constraints/SlugValidatorTest.php
PHPUnit 9.6.23 by Sebastian Bergmann and contributors.

Testing Symfony\Component\Validator\Tests\Constraints\SlugValidatorTest
..............                                                    14 / 14 (100%)

Time: 00:00.059, Memory: 39.02 MB

OK (14 tests, 19 assertions)

Now:

$ php ./phpunit src/Symfony/Component/Validator/Tests/Constraints/SlugValidatorTest.php
PHPUnit 9.6.23 by Sebastian Bergmann and contributors.

Testing Symfony\Component\Validator\Tests\Constraints\SlugValidatorTest
.................                                                 17 / 17 (100%)

Time: 00:00.047, Memory: 43.86 MB

OK (17 tests, 22 assertions)

@nicolas-grekas
Copy link
Member

Thank you @xabbuh.

@nicolas-grekas nicolas-grekas merged commit c0a1a3a into symfony:7.3 May 16, 2025
10 of 11 checks passed
@xabbuh xabbuh deleted the pr-58542 branch May 16, 2025 10:25
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.

4 participants
0