Remove deprecated code from user module

Created on 22 March 2024, 6 months ago
Updated 7 May 2024, 5 months ago

Problem/Motivation

Remove the following functions and related deprecation tests.

  • user_role_permissions
  • _user_role_permissions_update
  • user_role_names
  • user_roles
  • UserRequestSubscriber::__construct
  • UserController::__construct
  • User::hasPermission
  • PermissionHandler::__construct
  • UserLoginBlock::__construct

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

πŸ“Œ Task
Status

Fixed

Version

11.0 πŸ”₯

Component
User moduleΒ  β†’

Last updated 1 day ago

Created by

πŸ‡¦πŸ‡ΊAustralia mstrelan

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @mstrelan
  • obsidian_ β†’ made their first commit to this issue’s fork.

  • Assigned to obsidianicon
  • obsidian_ β†’ changed the visibility of the branch 3432868-remove-deprecated-code to hidden.

  • Pipeline finished with Success
    6 months ago
    Total: 531s
    #125736
  • Assigned to mstrelan
  • Status changed to Needs review 6 months ago
  • πŸ‡¦πŸ‡ΊAustralia mstrelan
  • Issue was unassigned.
  • Status changed to Needs work 6 months ago
  • πŸ‡¦πŸ‡ΊAustralia mstrelan

    I think we missed a few deprecations because I was searching for "removed from drupal:11" but there are a number of instances of "removed in drupal:11", "required in drupal:11" and "will cause an error in drupal:11". The reason I didn't search for @deprecated is because it also matched drupal:12.

    Adding the following to the issue summary:

    • UserRequestSubscriber::__construct
    • UserController::__construct
    • User::hasPermission
    • PermissionHandler::__construct
    • UserLoginBlock::__construct
  • First commit to issue fork.
  • Pipeline finished with Canceled
    5 months ago
    Total: 245s
    #153666
  • Pipeline finished with Failed
    5 months ago
    Total: 168s
    #153671
  • Pipeline finished with Canceled
    5 months ago
    Total: 663s
    #153673
  • Status changed to Needs review 5 months ago
  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    Removed remaining deprecations

  • Pipeline finished with Success
    5 months ago
    Total: 961s
    #153678
  • Status changed to Needs work 5 months ago
  • πŸ‡¬πŸ‡§United Kingdom catch

    One note on the MR - there's a deprecation for removal in 12.0.0 that should have been for 11.0.0 which I think we should go ahead and remove here, with a spin-off issue to fix the removal version in 10.3

  • Merge request !7658Update deprecation message' β†’ (Open) created by smustgrave
  • Status changed to Needs review 5 months ago
  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    Updated 7139 to remove that deprecation

    Opened 7658 for 10.3.x to update deprecation message.

  • Pipeline finished with Success
    5 months ago
    Total: 1107s
    #153851
  • Status changed to RTBC 5 months ago
  • πŸ‡¬πŸ‡§United Kingdom catch

    Thanks that looks good.

  • Status changed to Needs work 5 months ago
  • πŸ‡¬πŸ‡§United Kingdom longwave UK
    core/modules/user/src/Form/UserPasswordForm.php:      @\trigger_error('Passing $userNameValidator as \Drupal\Core\TypedData\TypedDataManagerInterface to ' . __METHOD__ . ' () is deprecated in drupal:10.3.0 and is removed in drupal:10.0.0. Pass a Drupal\user\UserValidator instead. See https://www.drupal.org/node/3431205', E_USER_DEPRECATED);
    

    This one is obviously wrong, we should fix or remove it here, but what should it be?

    core/modules/user/src/UserAuth.php:    @trigger_error(__METHOD__ . ' is deprecated in drupal:10.3.0 and will be removed from drupal 12.0.0. Implement \Drupal\user\UserAuthenticationInterface instead. See https://www.drupal.org/node/3411040');
    

    This one is missing the colon in drupal:12.0.0, let's also fix that here.

  • πŸ‡¬πŸ‡§United Kingdom catch

    The UserPasswordForm one should be removed in 11.0.0 - constructor for a form class, we can fix the deprecation message in the 10.3.x branch.

    The UserAuth one - let's just fix the colon in the 10.3.x branch here too?

  • First commit to issue fork.
  • Status changed to Needs review 5 months ago
  • πŸ‡³πŸ‡ΏNew Zealand quietone

    I have updated the 10.3.x branch per #16

  • Pipeline finished with Success
    5 months ago
    Total: 1015s
    #154111
  • πŸ‡¬πŸ‡§United Kingdom longwave UK

    Updated the 11.x branch.

  • Pipeline finished with Success
    5 months ago
    Total: 987s
    #154143
  • Status changed to RTBC 5 months ago
  • πŸ‡«πŸ‡·France andypost

    I find 11.x branch ready

    • alexpott β†’ committed 1c914f2d on 11.x
      Issue #3432868 by smustgrave, obsidian_, longwave, quietone, mstrelan,...
    • alexpott β†’ committed 82bc1eed on 10.3.x
      Issue #3432868 by smustgrave, obsidian_, longwave, quietone, mstrelan,...
  • Status changed to Fixed 5 months ago
  • πŸ‡¬πŸ‡§United Kingdom alexpott πŸ‡ͺπŸ‡ΊπŸŒ

    Committed 1c914f2 and pushed to 11.x. Thanks!
    Committed 82bc1ee and pushed to 10.3.x. Thanks!

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

Production build 0.71.5 2024