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.
Follow-up from #1599108: Allow modules to register services and subscriber services (events). The new language_manager() function doesn't return a manager, it returns a language. Therefore, rename it to language(). This is consistent with our pattern for cache() and similar functions.
This also cleans up a few things in the language() function body.
Comment | File | Size | Author |
---|---|---|---|
drupal-language_manager_cleanup.patch | 50.36 KB | effulgentsia | |
Comments
Comment #1
sunThanks!
I still have no idea how and where this static is reset for test runs... unless I'm mistaken, the languages are massively leaking into tests right now.
I also do not understand why we don't simply have a NonRequestContainer or HeadlessContainer, instead of those hard-coded lines in drupal_container(), and instead of this procedural language() helper.
But anyway, this patch is a good clean-up on its own, which simplifies and clarifies that current workaround.
Comment #2
Dries CreditAttribution: Dries commentedCommitted to 8.x. Thanks.
Comment #3
tim.plunkettOkay, then THIS can be the issue to fix the language docs on http://drupal.org/node/1539454
Comment #4
tim.plunkettI updated this myself.
This would have been enough for us to know how to update Views, which should be enough.