symfony: [RFC] Reconsider the use of the "Violation" word
This issue is about a topic that usually generates heated debates, so here’s a quick reminder: Symfony’s Code of Conduct applies to GitHub discussions too. You can express your agreement/disagreement with this proposal, but you must do it in a civilized way.
In the software industry we’re seeing lately some debates about the (bad) wording chosen for some concepts/technologies. That’s why words like “master/slave” are slowly being replaced by “primary/replica”. In the Symfony Validator component we use a word with a strong/negative meaning: violation. One of its meanings is literally “rape” (in languages like English, Spanish, etc.)
I propose to remove the use of Violation in our code and replace it by something like Error, Issue, etc. Most of the times we use “violation” in combination with “constraint”, so maybe we could rename ConstraintViolation as ValidationError. It would be more concise to write and even easier to understand.
A usual counter-argument to proposals like this one is: any given word can be offensive to some person; should we ban all words? That’s true. However, we don’t care if some word offends to one person or a tiny group of people. We only debate about words that are seen as “bad” or “better use a synonym” by a large enough number of people. I think “violation” fits this … but I can be wrong 😃
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 24
- Comments: 22 (19 by maintainers)
I understand the consideration but it’s the wrong way to take the question… making words “disappear” will never solve the problem. The problem is not the usage of the word, there are totally acceptable situations, eg. “violate the law” or in this case “violate a constraint”. It doesn’t signify raping at all.
If we start taking this path, we’ll end up in a very confuse situation where a lot of polysemic words should be banned.
I also understand you want to care about the sensibility of some people, but their “sensibility” is undeniabily altered after such “negative experiences” and what those people need is not hidding the reality but face them with according psychological help. We won’t help them doing such adaptations.
PS: don’t misunderstand me, I have very close relations that endured “hard things” so I’m not insensible to this question… quite the contrary. Also english is not my mother tongue… 😃
I’m closing this issue as “won’t fix” because nobody thinks that this is a bad word that should be considered … so that means we’re doing it right 👍 Thank you all for the civilized discussion!
Not sure if closing so fast was a good idea.
To me, the word
violationis the right word in this context, since the input violated the restrictions set by the data object (assuming you use DTO’s). Same thing goes for violating the law. You don’t “error”, you broke a rule and are thus in violation (a quick example would be a Parking violation).Something like
ValidationErrorsounds like the validation itself failed and not that the data provided is invalid.I understand that words and their meaning can change over time and that words can mean different things in different languages, but I don’t think this applies to
violation, at least not in this specific context.I’m also in keeping the
Violationname since it’s more used as a legal term. Even in French or Spanish I think the wordviolationis not really used in the context of a rape.Even synonyms are not really representative of what we are using in tech: https://www.thesaurus.com/browse/violation
well, getting a validation error when a validation constraint fails does not looks weird to me (note that it cannot be a
constraint validation, as that would make it avalidation, which does not make sense in this context)another option to consider could be to ensure that we always talk about
constraint violation, instead of doing it only “most of the time”. This extra context might be enough for these people (not sure about that)I wonder how renaming this is going to make someone who’s actually “violated” in some way feel any better.
@stof talking from the context of a form, I wasn’t clear about that, my bad:
From a form perspective, this is correct. The conversion from a constraint violation to a form error happens behind the scene.
From the perspective of a developer it can already be a bit confusing:
There’s no naming consistency