PHP 8.2 Deprecated function: Creation of dynamic property

Created on 11 January 2024, 12 months ago

Problem/Motivation

After switching to PHP 8.2 the module started throwing the following errors:

Deprecated function: Creation of dynamic property Drupal\drupalauth4ssp\SspHandler::$config is deprecated in Drupal\drupalauth4ssp\SspHandler->__construct() (line 32 of modules/contrib/drupalauth4ssp/src/SspHandler.php).

Deprecated function: Creation of dynamic property Drupal\drupalauth4ssp\SspHandler::$pathMatcher is deprecated in Drupal\drupalauth4ssp\SspHandler->__construct() (line 33 of modules/contrib/drupalauth4ssp/src/SspHandler.php).

Deprecated function: Creation of dynamic property Drupal\drupalauth4ssp\SspHandler::$request is deprecated in Drupal\drupalauth4ssp\SspHandler->__construct() (line 34 of modules/contrib/drupalauth4ssp/src/SspHandler.php).

This is caused by the properties mentioned in the warning not being defined in SspHandler class before they were used. PHP 8.2 deprecated usage of dynamic properties.

Steps to reproduce

Install the module on Drupal 10 with PHP 8.2. The warning will be displayed on every page request.

Proposed resolution

Define mentioned properties in the class.

๐Ÿ› Bug report
Status

Active

Version

2.0

Component

Code

Created by

๐Ÿ‡ง๐Ÿ‡พBelarus spleshka UAE

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024