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.
Part of #2047951: [META] Remove calls to deprecated global $user and $GLOBALS['user']
Remove all entries:
core/modules/content_translation/content_translation.module: 'uid' => $GLOBALS['user']->id(),
core/modules/content_translation/lib/Drupal/content_translation/ContentTranslationController.php: $name = $new_translation ? $GLOBALS['user']->name : user_load($entity->translation[$form_langcode]['uid'])->name;
core/modules/content_translation/lib/Drupal/content_translation/Tests/ContentTranslationSyncImageTest.php: 'uid' => $GLOBALS['user']->id(),
Comments
Comment #1
m1r1k CreditAttribution: m1r1k commentedHere is a patch. Depends on #2076411: Remove the request scope from the current user service
Comment #3
m1r1k CreditAttribution: m1r1k commentedOh, wrong patch, I'll post correct one shortly
Comment #4
m1r1k CreditAttribution: m1r1k commentedHere is patch
Comment #6
m1r1k CreditAttribution: m1r1k commentedWeird, but it works nice on my local, lets try to retest. Also upload new patch with correct name:
Comment #7
m1r1k CreditAttribution: m1r1k commentedSorry, wrong patch.
Comment #8
m1r1k CreditAttribution: m1r1k commentedRe-roll after #2053489: Standardize on \Drupal throughout core
Comment #10
m1r1k CreditAttribution: m1r1k commentedTry with removed
request: scope
for current_user serviceComment #11
m1r1k CreditAttribution: m1r1k commentedPush to retesting
Comment #12
m1r1k CreditAttribution: m1r1k commentedComment #13
catchComment #14
joelpittet#8: content-translation-remove-global-user-from-translation-module-2078057-8.patch queued for re-testing.
Comment #15
joelpittet#10 looks like the wrong patch, but #8 is dead on. If #8 comes back green it's ready to be RTBC.
Comment #16
areke CreditAttribution: areke commented@joelpittet You're right. #10 is wrong. I re-rolled the patch at #8 because it's the patch we're looking for.
Comment #17
joelpittetPerfect! Thanks I think this is good to go:) Checked there was no remaining in the content translation module and it passes testbot. Thanks @areke
Comment #18
catchNo longer applies.
Comment #19
joelpittetRe-roll of #16, auto merged.
Comment #20
joelpittetSetting this back to RTBC because I double checked the re-roll and there is no other changes necessary.
Comment #21
xjm19: 2078057-19-global-user-content-translation.patch queued for re-testing.
Comment #22
catchCommitted/pushed to 8.x, thanks!