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
[Validator] Validate time without seconds #48907
[Validator] Validate time without seconds #48907
Conversation
Hey! Thanks for your PR. You are targeting branch "6.3" but it seems your PR description refers to branch "6.3 for features". Cheers! Carsonbot |
Hey! I think @alexandre-daubois has recently worked with this code. Maybe they can help review this? Cheers! Carsonbot |
src/Symfony/Component/Validator/Tests/Constraints/TimeValidatorTest.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Validator/Tests/Constraints/TimeValidatorTest.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Validator/Tests/Constraints/TimeValidatorTest.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Validator/Tests/Constraints/TimeValidatorTest.php
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's decide are we using typed properties and generators in tests and then I'll finish the rest remarks.
I'd looked at others constraints when I changed the Time
constraint. AFAIR there weren't typed properties, I suppose because of the internal property accessor inside the \Symfony\Component\Validator\Constraint
.
Also about tests. The generators haven't been used in TimeTest
at least.
If you suggest me to do a chore, I'll better do it in another PR.
src/Symfony/Component/Validator/Tests/Constraints/TimeValidatorTest.php
Outdated
Show resolved
Hide resolved
@xepozz Can you rebase on 6.4 to get rid of the merge commit? Thank you. |
d9359b0
to
08c72e5
Compare
08c72e5
to
37617a8
Compare
Thank you @xepozz. |
Oh I just wanted to do rebase, but you were first 😀 |
Adds ability to validate time with the
Time
constraint without having the last part of the regexp that's responsible for seconds.I don't want to override the
Time
and create a new one with custom logic because I think that it maybe helpful for others.Tell me if I need to touch the docs