Skip to content

[Validator] [WordCount] Treat 0 as one character word and do not exclude it #60270

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
Apr 27, 2025

Conversation

sidz
Copy link
Contributor

@sidz sidz commented Apr 25, 2025

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

New WordCount validator has been introduced in the Symfony 7.2 but it has an issue and treats sentence ended on zero (0) as contains an empty string.

This PR adds a callback function into array_filter to fix the issue.

@carsonbot

This comment has been minimized.

@sidz sidz changed the base branch from 7.3 to 7.2 April 25, 2025 11:02
@sidz
Copy link
Contributor Author

sidz commented Apr 25, 2025

Failed unit tests seems not related to my changes

Copy link
Contributor

@mtarld mtarld left a comment

Choose a reason for hiding this comment

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

Nice catch!

@fabpot fabpot modified the milestones: 7.3, 7.2 Apr 27, 2025
@fabpot fabpot force-pushed the fix-word-count-validator branch from a801daa to 6fded36 Compare April 27, 2025 15:48
@fabpot
Copy link
Member

fabpot commented Apr 27, 2025

Thank you @sidz.

@fabpot fabpot merged commit ff10bca into symfony:7.2 Apr 27, 2025
10 of 11 checks passed
@sidz sidz deleted the fix-word-count-validator branch April 27, 2025 17:07
@fabpot fabpot mentioned this pull request May 2, 2025
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.

6 participants