Problem/Motivation

Discovered at #2972224: Add .cspell.json to automate spellchecking in Drupal core, and pointed by @xjm in https://www.drupal.org/project/drupal/issues/3122088#comment-13628724

+++ b/core/.cspell.json
@@ -0,0 +1,1288 @@
+      "Protectected",

Proposed resolution

@xjm: Protected.

As title and see the change record https://www.drupal.org/node/3122084 for how to work with cspell.

Remaining tasks

Pick out all applicable words from #2972224: Add .cspell.json to automate spellchecking in Drupal core and fix them.

User interface changes

API changes

Data model changes

Release notes snippet

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jungle created an issue. See original summary.

sja112’s picture

Assigned: Unassigned » sja112
sja112’s picture

Assigned: sja112 » Unassigned
Status: Active » Needs review
FileSize
1.46 KB
mohrerao’s picture

Status: Needs review » Reviewed & tested by the community
FileSize
169.35 KB

Checked for occurrence of 'Protectected' after applying 3138786-3.patch and found none.
check for word Protectected
Moving to RTBC

  • xjm committed 8acabfb on 9.1.x
    Issue #3138786 by sja112, mohrerao: Fix "Protected" relevant typos in...

  • xjm committed db31f4f on 9.0.x
    Issue #3138786 by sja112, mohrerao: Fix "Protected" relevant typos in...

  • xjm committed 39c69cb on 8.9.x
    Issue #3138786 by sja112, mohrerao: Fix "Protected" relevant typos in...

  • xjm committed 7133808 on 8.8.x
    Issue #3138786 by sja112, mohrerao: Fix "Protected" relevant typos in...
xjm’s picture

Version: 9.1.x-dev » 8.8.x-dev
Status: Reviewed & tested by the community » Fixed
+++ b/core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php
@@ -1231,7 +1231,7 @@ protected function assertPatchProtectedFieldNamesStructure() {
-    $this->assertTrue($keys_are_field_names && $values_are_expected_access_denied_reasons, 'In Drupal 8.6, the structure of $patchProtectectedFieldNames changed. It used to be an array with field names as values. Now those values are the keys, and their values should be either NULL or a string: a string containing the reason for why the field cannot be PATCHed, or NULL otherwise.');
+    $this->assertTrue($keys_are_field_names && $values_are_expected_access_denied_reasons, 'In Drupal 8.6, the structure of $patchProtectedFieldNames changed. It used to be an array with field names as values. Now those values are the keys, and their values should be either NULL or a string: a string containing the reason for why the field cannot be PATCHed, or NULL otherwise.');

Nice. In this case it was an actual misspelling of a variable name. (In a string message, but still a helpful improvement.)

Thanks @mohrerao for reviewing. In addition to pasting the CLI output directly next time, I'd also suggest using grep -ri in case there are other places where the same typo has a different casing.

I looked in the actual test to verify the change here and make sure it was backportable, since this is a weirdly long message for a test assertion. It appears that it's being used here within a custom assertion, and so that's why the message is so long. Since it's fixing the message output of the test, I think it's a patch-eligible bugfix. So, I committed this to 9.1.x, and cherry-picked it to 9.0.x, 8.9.x, and 8.8.x. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.