Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
- In core, language_set_browser_drupal_langcode_mappings() is only called from one place, and that usage can be simplified to not call it.
- If we leave the function for contrib to use, we should add a test for it, so issues like #2392319: Config objects (but not config entities) should by default be immutable don't break it.
- Either removing the function, or deciding not to, is a blocker for #2392319: Config objects (but not config entities) should by default be immutable, so Critical priority.
Proposed resolution
Remove the function.
Remaining tasks
User interface changes
API changes
Remove language_set_browser_drupal_langcode_mappings()
Beta phase evaluation
Issue priority | Critical because it blocks #2392319: Config objects (but not config entities) should by default be immutable |
---|---|
Disruption | None |
Comment | File | Size | Author |
---|---|---|---|
language.remove_useless_setter_wrapper.patch | 2.4 KB | effulgentsia | |
Comments
Comment #1
Gábor HojtsyMakes sense. I don't believe we'll need the wrapper.
Comment #2
alexpottThese wrappers are legacy code in the language module there is no need to maintain them imo. This method has only ever existed in D8 - it was introduced by one of the patches committed on #365615: Language detection not working correctly for most Chinese readers (and add a user interface for all browser language mappings) (wow what a mess of an issue). And I don't believe removing this warrants a CR.
Committed 8e52db7 and pushed to 8.0.x. Thanks!
Comment #4
Gábor HojtsyBTW #2166919: Objectify configuration code for language negotiation plugins is a more ambitious cousin of this one.