Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dstorozhuk’s picture

Status: Active » Needs review
FileSize
1.44 KB

Removed calls in functions:

  1. system_help()
  2. system_user_timezone()

Status: Needs review » Needs work

The last submitted patch, system.module-2062211.patch, failed testing.

m1r1k’s picture

Title: Remove calls to deprecated global $user in system module » Remove calls to deprecated global $user in system module (first part)
Assigned: dstorozhuk » m1r1k
Status: Needs work » Needs review
FileSize
2.65 KB

Here is a patch. It includes only part of changes, because almost all tests include session usages, that is not ready for current_user yet:

m1r1k’s picture

joelpittet’s picture

Status: Needs review » Needs work
+++ b/core/modules/system/lib/Drupal/system/Tests/System/TokenReplaceTest.php
@@ -32,7 +32,7 @@ function testTokenReplacement() {
+    $user = $this->container->get('current_user');

Shouldn't this be $user = \Drupal::currentUser(); as well? I could be totally wrong, in that case this is ready.

joelpittet’s picture

Assigned: m1r1k » Unassigned
Status: Needs work » Needs review
Issue tags: -CodeSprintCIS
FileSize
6.59 KB
8.33 KB

Seems to work locally for that so i'm posting. Also there was a few more spots needing attention.

Status: Needs review » Needs work

The last submitted patch, 2062211-6-global-user-system.patch, failed testing.

joelpittet’s picture

Status: Needs work » Needs review

#6: 2062211-6-global-user-system.patch queued for re-testing.

Status: Needs review » Needs work

The last submitted patch, 2062211-6-global-user-system.patch, failed testing.

joelpittet’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 6: 2062211-6-global-user-system.patch, failed testing.

joelpittet’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 6: 2062211-6-global-user-system.patch, failed testing.

rych’s picture

Issue summary: View changes
Status: Needs work » Needs review
FileSize
6.19 KB

The code has changed since #6 patch.

Status: Needs review » Needs work

The last submitted patch, 14: system-remove-global-user-first-part-2062211-14.patch, failed testing.

rych’s picture

Status: Needs work » Needs review
FileSize
1.87 KB

Test files need global $user variable: "NOTE: The global $user variable still exists as it is necessary for certain portions of the installer and simpletest..."

Modified files:

  • system.module
  • system.api.php
joelpittet’s picture

@rych cool you got it green!

For the ones in test files, what can we do with them? Do they need a follow-up issue to swing around once the rest are complete or do they need to be rewritten somehow?

joelpittet’s picture

Issue summary: View changes
Status: Needs review » Reviewed & tested by the community
Related issues: +#2150869: Remove calls to deprecated global $user in system module Tests

Ok moved the tests conversion task to it's own issue so this one is ready to go #2150869: Remove calls to deprecated global $user in system module Tests

catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed/pushed to 8.x, thanks!

Status: Fixed » Closed (fixed)

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