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.

starting on line 697 of node.module there are many instances of the $GLOBALS['language_interface'] that can be updated to use dependency injection.

CommentFileSizeAuthor
#2 1539626_1_node_di.patch1.12 KBcosmicdreams
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

sun’s picture

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

Status: Active » Needs review
FileSize
1.12 KB

First shot at it.

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! Do we have a follow up to move LANGUAGE_TYPE_INTERFACE to Language::INTERFACE?

cosmicdreams’s picture

catch’s picture

Status: Reviewed & tested by the community » Fixed

Thanks. Committed/pushed to 8.x.

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