Make UserSession::name protected

Created on 18 March 2025, 24 days ago

Problem/Motivation

The UserSession class has a @todo to make all properties protected. The only remaining one in 11.x is the name property.

This issue makes the name property protected and deprecates calling the function directly. This should cause no BC breaks until the deprecation layer is removed in 12.x

Steps to reproduce

Proposed resolution

Make the name property protected
Add a BC layer with __get & __isset

Remaining tasks

Open MR
Review
Merge

API changes

UserSession::name is now protected.

Release notes snippet

πŸ“Œ Task
Status

Active

Version

11.0 πŸ”₯

Component

user.module

Created by

πŸ‡³πŸ‡ΏNew Zealand danielveza Brisbane, AU

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

Merge Requests

Comments & Activities

  • Issue created by @danielveza
  • Pipeline finished with Failed
    24 days ago
    Total: 106s
    #451678
  • Pipeline finished with Failed
    24 days ago
    Total: 526s
    #451700
  • Pipeline finished with Success
    24 days ago
    Total: 640s
    #451733
  • Pipeline finished with Success
    24 days ago
    Total: 1061s
    #451736
  • πŸ‡³πŸ‡ΏNew Zealand danielveza Brisbane, AU

    MR is up for this and green. Moving to review.

    I imagine this will need a CR?

    How would we want to handle the removal of this code in D12? Do we wait for this to be committed and open a follow up?

  • πŸ‡¦πŸ‡ΊAustralia kim.pepper πŸ„β€β™‚οΈπŸ‡¦πŸ‡ΊSydney, Australia

    Reviewed this and checked the property can still be accessed and there is a test to trigger the deprecation.

    RTBC once we have a CR.

    > I imagine this will need a CR?

    Yep.

    > How would we want to handle the removal of this code in D12? Do we wait for this to be committed and open a follow up?

    I think this would get handled when we make deprecation removal issues when 12.x opens up.

  • πŸ‡¦πŸ‡ΊAustralia kim.pepper πŸ„β€β™‚οΈπŸ‡¦πŸ‡ΊSydney, Australia

    All good now.

  • Pipeline finished with Failed
    22 days ago
    Total: 612s
    #453743
  • πŸ‡³πŸ‡ΏNew Zealand danielveza Brisbane, AU

    Feedback addressed and tests are green again

  • πŸ‡¦πŸ‡ΊAustralia mstrelan

    Thanks for addressing the isset feedback. I've left one more minor nit but happy to leave at RTBC.

  • Pipeline finished with Success
    18 days ago
    Total: 603s
    #456729
Production build 0.71.5 2024