Closed lyrixx closed 3 years ago
IMHO createSingleConstraint('...')
implies the same as new ConstraintViolation('...')
, and then new ConstraintViolationList([new ConstraintViolation('..')])
isnt that bad.
To utilize that, i suggest ConstraintViolationList::createFromMessage(s)
Description It's very common to do that in Symfony Application:
Note: The last line is not related, but will help to better undertand
As you can see, it's a bit boring and really not straightforward to create this piece of code E_TOO_MANY_PARAMETER
What do you thing about something like:
If it's OK for you, I'll do the PR