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.
Now that dependency injection has made it into core: #1497230: Use Dependency Injection to handle object definitions we should reduce the number of things we put into the $GLOBALS array, starting with things that touch the site's language.
There are many uses of the $GLOBALS['lanaguage_interface'] that can now be updated to use the drupal_container()->get[LANGUAGE_TYPE_INTERFACE]
that was provided in the recent patch.
Comment | File | Size | Author |
---|---|---|---|
#1 | 1539622_1_local.patch | 2.4 KB | cosmicdreams |
Comments
Comment #1
cosmicdreams CreditAttribution: cosmicdreams commentedfirst try
Comment #2
cosmicdreams CreditAttribution: cosmicdreams commentedsending it to testbot to see where I'm at
Comment #3
sunComment #4
cosmicdreams CreditAttribution: cosmicdreams commented#1: 1539622_1_local.patch queued for re-testing.
Comment #5
cosmicdreams CreditAttribution: cosmicdreams commentedAssigning to me so I can show these to folks easier
Comment #6
RobLoachEasy pickins.
Comment #7
catchOK this makes sense. It'll be good when we have actual dependency injection instead of the drupal_container() calls, but since this is direct swap for $GLOBALS it seems fine to remove that bc layer. Committed/pushed to 8.x.