PHP 8.2 Deprecated function: Creation of dynamic property (Image Widget Crop)

Created on 30 April 2024, 7 months ago
Updated 9 July 2024, 5 months ago

Problem/Motivation

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

Deprecated function: Creation of dynamic property Drupal\image_widget_crop\ImageWidgetCropManager::$configFactory is deprecated in Drupal\image_widget_crop\ImageWidgetCropManager->__construct() (line 84 of modules/contrib/image_widget_crop/src/ImageWidgetCropManager.php).

This is caused by the properties mentioned in the warning not being defined in ImageWidgetCropManager 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

Needs review

Version

2.0

Component

User interface

Created by

๐Ÿ‡ฎ๐Ÿ‡ณIndia rahulrasgon

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