You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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)
…createFromMessage()` (lyrixx)
This PR was merged into the 5.4 branch.
Discussion
----------
[Validator] Add support for `ConstraintViolationList::createFromMessage()`
| Q | A
| ------------- | ---
| Branch? | 5.x (5.4)
| Bug fix? | no
| New feature? | ye
| Deprecations? | no
| Tickets | Fix#41111
| License | MIT
| Doc PR |
Commits
-------
d4b6436 [Validator] Add support for `ConstraintViolationList::createFromMessage()`
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
The text was updated successfully, but these errors were encountered: