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 .
On line 952 and 1019 of comment.module we are using $GLOBALS['lanaguage_content]->langcode . We should modify this to use the DI container.
Comment | File | Size | Author |
---|---|---|---|
#7 | 1539608.patch | 1017 bytes | RobLoach |
#2 | 1539608_2_comment_di.patch | 1017 bytes | cosmicdreams |
Comments
Comment #1
sunComment #2
cosmicdreams CreditAttribution: cosmicdreams commentedFirst Try
Comment #3
cosmicdreams CreditAttribution: cosmicdreams commentedAssigning to me so I can show these to folks easier
Comment #4
RobLoachAnother easy one :-) .
Comment #5
Dries CreditAttribution: Dries commentedMmm, doesn't seem to apply anymore. Asking for a re-test.
Comment #6
Dries CreditAttribution: Dries commented#2: 1539608_2_comment_di.patch queued for re-testing.
Comment #7
RobLoachRe-rolled.
Comment #8
cosmicdreams CreditAttribution: cosmicdreams commentedstill simple, short and sweet.
Comment #9
Dries CreditAttribution: Dries commentedGreat. Committed to 8.x. Thanks!