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.

CommentFileSizeAuthor
#1 1539622_1_local.patch2.4 KBcosmicdreams
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

cosmicdreams’s picture

FileSize
2.4 KB

first try

cosmicdreams’s picture

Status: Active » Needs review

sending it to testbot to see where I'm at

sun’s picture

Component: language system » locale.module
Issue tags: +Dependency Injection (DI)
cosmicdreams’s picture

#1: 1539622_1_local.patch queued for re-testing.

cosmicdreams’s picture

Assigned: Unassigned » cosmicdreams

Assigning to me so I can show these to folks easier

RobLoach’s picture

Priority: Normal » Minor
Status: Needs review » Reviewed & tested by the community

Easy pickins.

catch’s picture

Status: Reviewed & tested by the community » Fixed

OK 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.

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