Support from Acquia helps fund testing for Drupal Acquia logo

Comments

victor-shelepen’s picture

Fixed. It works by manual testing. I see the language module also has problems with tests.

Spleshka’s picture

Status: Active » Needs review
Spleshka’s picture

Issue tags: -likin

Name is not a tag.

Gábor Hojtsy’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: -D8MI-meta +D8MI, +sprint, +language-base

This looks very straightforward and all are in global functions, so global invocation of Drupal::* is appropriate.

webchick’s picture

Status: Reviewed & tested by the community » Postponed

This patch and all of its ilk are postponed on at least a couple of upstream issues right now. See the referenced meta issue.

Gábor Hojtsy’s picture

Status: Postponed » Needs work
m1r1k’s picture

m1r1k’s picture

Assigned: victor-shelepen » m1r1k

for easier tracking

Gábor Hojtsy’s picture

Is Drupal::currentUser() the best current way to access this? Also, I think Drupal:: should be \Drupal:: no?

Gábor Hojtsy’s picture

Title: Remove calls to deprecated global $user » Remove calls to deprecated global $user from language.module
m1r1k’s picture

Drupal::currentUser() is an official way to get current userSession object now, also \Drupal:: is used on OO code, not in functional as I know. Did I miss something?

Gábor Hojtsy’s picture

Status: Needs review » Reviewed & tested by the community

Right, superb, let's get this in then!

alexpott’s picture

Status: Reviewed & tested by the community » Postponed

Let's postpone this on #2076411: Remove the request scope from the current user service as the patch includes it :)

m1r1k’s picture

Issue tags: +blocked-by-request-scope

For easy tracking

catch’s picture

Status: Postponed » Needs review
Gábor Hojtsy’s picture

Issue tags: -D8MI, -sprint, -language-base, -CodeSprintCIS, -blocked-by-request-scope

Status: Needs review » Needs work
Issue tags: +D8MI, +sprint, +language-base, +CodeSprintCIS, +blocked-by-request-scope

The last submitted patch, language-remove-global-user-from-language-module-2061929-7.patch, failed testing.

joelpittet’s picture

Issue tags: -sprint +Needs reroll

.

robmc’s picture

robmc’s picture

Status: Needs work » Needs review

Change status

Gábor Hojtsy’s picture

Status: Needs review » Reviewed & tested by the community

Looks simple and good.

joelpittet’s picture

Assigned: m1r1k » Unassigned
+++ b/core/modules/language/language.module
@@ -450,7 +450,7 @@ function language_get_default_langcode($entity_type, $bundle) {
+      $user = Drupal::currentUser();

We should prefix Drupal as \Drupal for this: #2053489: Standardize on \Drupal throughout core ?

webchick’s picture

Status: Reviewed & tested by the community » Needs work

Yep.

InternetDevels’s picture

Status: Needs work » Needs review
FileSize
2.2 KB
Gábor Hojtsy’s picture

Status: Needs review » Reviewed & tested by the community
alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed f5a948f and pushed to 8.x. Thanks!

Status: Fixed » Closed (fixed)

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