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.
starting on line 697 of node.module there are many instances of the $GLOBALS['language_interface'] that can be updated to use dependency injection.
Comment | File | Size | Author |
---|---|---|---|
#2 | 1539626_1_node_di.patch | 1.12 KB | cosmicdreams |
Comments
Comment #1
sunComment #2
cosmicdreams CreditAttribution: cosmicdreams commentedFirst shot at it.
Comment #3
cosmicdreams CreditAttribution: cosmicdreams commentedAssigning to me so I can show these to folks easier
Comment #4
RobLoachEasy! Do we have a follow up to move LANGUAGE_TYPE_INTERFACE to Language::INTERFACE?
Comment #5
cosmicdreams CreditAttribution: cosmicdreams commentedYes, #1573084: Move Language constants to Language PSR-0 code
Comment #6
catchThanks. Committed/pushed to 8.x.