Problem/Motivation
This issue is to coordinate all the steps in order to remove all other uses of "illegal" that were not addressed on Re-word "An illegal choice has been detected" message to remove legality suggestion.
Currently there are 40+ lines of code using the word "illegal", which includes comments, function names, schemas, constraints.
Proposed resolution
Change uses of 'illegal' to 'invalid'
Add 'illegal' to cspell flag word to prevent further instances creeping in.
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
| Comment | File | Size | Author |
|---|---|---|---|
| Screenshot 2023-02-11 at 00.02.54.png | 964.57 KB | schlaukopf |
Issue fork drupal-3340978
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 3340978-meta-remove-other
changes, plain diff MR !14382
Comments
Comment #2
schlaukopf commentedComment #3
xjmComment #7
quietone commentedI simply changed 'illegal' to 'invalid', which is the simplest thing to do here. I also added 'illegal' to prevent future usages of the word, I don't see the code base dealing with legality.
Comment #8
ghost of drupal pastFun historical tidbit: Dries raised the illegal vs invalid wording problem twenty years ago but it got lost in the noise trying to make the option checker work which was quite the fight. While I remember the fight which lasted until 2010 I didn't remember this piece until I searched the original issue for invalid to see whether anyone raised it: #39179-10: Make optgroups work with choice checker.
Comment #9
dcam commentedI left a few comments on the MR. I tried to review the text changes for grammar and accuracy.
Comment #10
quietone commented@dcam, thanks for review. I have applied the fixes you suggested.
Comment #11
dcam commentedThank you for considering my feedback. This looks good to me now.
Comment #12
ghost of drupal pastNot sure about y'all but I do. You kind of found it out too but let me finish your comment: when I originally wrote aggregate support the methods
existsAggregateandnotExistsAggregatewere just calledexistsandnotExiststhe same methods as onQueryInterface-- this was a mistake on my end -- which led to this mysterious comment on them. This is visible in the first patch attached. Also in that patchsortAggregatedidn't have any documentation. Then as the issue proceeded the requirement to have some documentation on everything even if it makes no sense have bitten you in that someone else I don't want to blame because the policy is to blame just copy-pasted these comments with minor adjustments. And then in #1854708-27: EntityQuery aggregation support the current method names were introduced and the original comments were removed but the copy-paste remained. The chain of disaster is now complete.Documentation bloat delenda est: the project needs remove the requirement to document everything, add a requirement to document when it's needed, change documentation standards to emphasize the documentation focus is on helping developers so reviewers can point to it so that on commit there's documentation where it's needed but not more. Add a footnote to every change record stating when people upgrade their code and find the documentation inadequate they should be filing issues especially if they managed to figure it out because that's usually the best moment to document something.
Comment #13
dwwYes, please! +100.
Since we're actually changing the strings with an MR in this issue, this is more of a task than a plan.
On main, a recursive, case-insensitive grep for 'illegal' gives me 54 hits.
On the MR branch, we're down to these 7:
Nothing else to improve. Ship it. Thanks!
Comment #14
dcam commentedThere was a merge conflict in
core/modules/user/src/Plugin/Validation/Constraint/UserNameConstraint.php. I rebased the MR.Comment #15
dwwRe-reviewed recent commits. Still RTBC to my eyes.
Thanks!
-Derek
Comment #16
longwaveThis can only go into a minor release as it contains a handful of user-facing string changes.
Committed and pushed 5d2be21b9ee to main and a3c0a51ba23 to 11.x. Thanks!