Dynamic Properties are deprecated: userswitch | PHP 8.2

Created on 20 June 2024, 6 months ago

Problem/Motivation

Hello,

In PHP 8.2 and later, setting a value to an undeclared class property is deprecated, and emits a deprecation notice the first time the property is set during the lifetime of the application execution.

Deprecated function: Creation of dynamic property Drupal\userswitch\Controller\UserSwitchController::$userswitch is deprecated in Drupal\userswitch\Controller\UserSwitchController->__construct() (line 32)

I created patch for this warning.

Steps to reproduce

1. Enable PHP 8.2 or later.
2. Login to other user with user switch.

🐛 Bug report
Status

RTBC

Version

1.9

Component

Code

Created by

🇱🇹Lithuania Edvinasas

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

Comments & Activities

Production build 0.71.5 2024