Move AccountInterface out of Session namespace

Created on 24 April 2015, over 9 years ago
Updated 30 January 2024, 11 months ago

Problem/Motivation

As of #2347799: Remove bugged session-related methods from AccountInterface β†’ the AccountInterface does not have any session related methods anymore. In addition πŸ“Œ Load user entity in Cookie AuthenticationProvider instead of using manual queries Needs work removes the usage UserSession from production code entirely.

Proposed resolution

Move the AccountInterface and AnonymousUser to \Drupal\Core\Authentication interface. Replace UserSession with a User entity in the remaining test code.

Remaining tasks

approve change
commit

User interface changes

no

API changes

  • Move \Drupal\Core\Session\AccountInterface to \Drupal\Core\Authentication\AccountInterface, but leave a deprecated subinterface thereof at the old place.
  • Move \Drupal\Core\Session\AnonymousUserSession to \Drupal\Core\Authentication\AnonymousUser.
  • Remove \Drupal\Core\Session\UserSession and replace it with user entity πŸ“Œ Load user entity in Cookie AuthenticationProvider instead of using manual queries Needs work .
  • Move \Drupal\Core\Session\AccountProxy to \Drupal\Core\Authentication\AccountProxy
  • Move \Drupal\Core\Session\AccountSwitcher to \Drupal\Core\Authentication\AccountSwitcher

Follow-up to #2347799: Remove bugged session-related methods from AccountInterface β†’

πŸ“Œ Task
Status

Needs work

Version

11.0 πŸ”₯

Component
User systemΒ  β†’

Last updated about 2 hours ago

Created by

πŸ‡¨πŸ‡­Switzerland znerol

Live updates comments and jobs are added and updated live.
  • Needs change record

    A change record needs to be drafted before an issue is committed. Note: Change records used to be called change notifications.

  • Needs reroll

    The patch will have to be re-rolled with new suggestions/changes described in the comments in the issue.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024