The header documentation is wrong. The original issue #2635784: Deprecate ThemeHandler::setDefault() in favour of configuration and replace usages fixed this in all the tests, and initially commented with $this->config() assuming that TestBase was the class. In comment 40 this was suggested to be \Drupal::config() and that was changed in the comment. The problem is that \Drupal::config() returns the readonly config object whereas TestBase::config() returns the editable config object. We need the editable config object. Attached is a patch that fixes this comment.
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | 2882784-06.patch | 745 bytes | harsha012 |
| #3 | 2882784-03.patch | 731 bytes | harsha012 |
Comments
Comment #2
joelpittetThanks for the patch, the code snippet should end in a semi colon but otherwise this looks fine.
Comment #3
harsha012 commentedfixed the issue
Comment #4
joelpittetThanks!
Comment #5
lauriiiSince this is part of the @deprecated section, this should be intended with 2 more spaces
Comment #6
harsha012 commentedfixed the indent issues
Comment #7
joelpittetThanks for the quick fix. Didn't know that about @deprecated, thanks @lauriii
Comment #10
lauriiiCommitted 40f9a70 and pushed to 8.5.x. Thanks!
Leaving as RTBC against 8.4.x
Comment #12
xjmCherry-picked back to 8.4.x as well; thanks @lauriii.