PHP 8.2 and later compatibility: "Creation of dynamic property" warnings

Created on 15 April 2025, 25 days ago

Problem/Motivation

Seen the following when running our Functional Tests:
```Deprecated: Creation of dynamic property Drupal\sharepoint_connector\SharepointConnector::$client_id is deprecated in /var/www/html/docroot/modules/contrib/sharepoint_connector/src/SharepointConnector.php on line 74

Deprecated: Creation of dynamic property Drupal\sharepoint_connector\SharepointConnector::$client_secret is deprecated in /var/www/html/docroot/modules/contrib/sharepoint_connector/src/SharepointConnector.php on line 75

Deprecated: Creation of dynamic property Drupal\sharepoint_connector\SharepointConnector::$tenant_id is deprecated in /var/www/html/docroot/modules/contrib/sharepoint_connector/src/SharepointConnector.php on line 76

Deprecated: Creation of dynamic property Drupal\sharepoint_connector\SharepointConnector::$base_url is deprecated in /var/www/html/docroot/modules/contrib/sharepoint_connector/src/SharepointConnector.php on line 77```

Steps to reproduce

Proposed resolution

I've looked at the code and the constructor already initializes these properties, so no further changes are needed in the constructor.

Adding the missing properties to the class definition resolves the issue found.

Remaining tasks

User interface changes

API changes

Data model changes

πŸ“Œ Task
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡¬πŸ‡§United Kingdom Michelle-Buckby

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

Comments & Activities

Production build 0.71.5 2024