-
Notifications
You must be signed in to change notification settings - Fork 25
Added Symfony validator assertions #189
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
Conversation
@cs278 @W0rma @xEdelweiss @ThomasLandauer These assertions verify that the Symfony validator component is working correctly in the application, specifically with the test data defined in the test cases. If you have some free time please review my PR :-) |
What about shortening the name a bit, from |
Hi @ThomasLandauer For the moment, I agree that the "count" method should be plural, thank you very much for pointing that out. |
IMO, "violation" is a common term in programming, so I guess it's politically correct :-) |
If I think in terms of Symfony, validator constraints is a pretty commonly known naming, so I think my first guess reading FYI, Symfony itself also doesn't use 'constraint' in the method naming, but then again, in the Symfony context that might not be necessary: https://github.com/symfony/symfony/blob/7.0/src/Symfony/Component/Validator/Test/ConstraintValidatorTestCase.php |
Hi @TavoNiievez I also like the shorter names, and the Symfony Serializer uses 'violations' as a key in normalization, so it should be easy to understand. On the other hand, a longer name makes it easier to discover the method without looking at the docs. At least I try to "guess" the appropriate method first :) |
Examples: