[PHP 8.2] Deprecation notice when opening the entity browser modal window

Created on 19 November 2023, about 1 year ago
Updated 23 November 2023, about 1 year ago

Problem/Motivation

I'm creating a few blog nodes and I am seeing this warning when opening the entity browser modal window:

pening the Media Directory UI gives the following with PHP 8.2:
Deprecated function: Creation of dynamic property Drupal\entity_browser\Plugin\EntityBrowser\WidgetSelector\Single::$widget_ids is deprecated in Drupal\entity_browser\WidgetSelectorBase->__construct() (line 43 of modules/contrib/entity_browser/src/WidgetSelectorBase.php).

Steps to reproduce

1. Run WxT 5.0.1 / WxT 5.0.x-dev on PHP 8.2
2. Go to /node/add/blog_post
3. Scroll down and click on "Select Image(s)" for the "Image" field

Proposed resolution

There is already an issue for that (RTBC status) in the project's page: https://www.drupal.org/project/entity_browser/issues/3350169 🐛 Fix PHP 8.2 deprecation issue with WidgetSelectorBase-class Fixed

It looks like the change is not merged yet, in the meantime, we can use this patch, I tested it and works as expected (no warning after applying the patch): https://www.drupal.org/files/issues/2023-06-15/3350169-8_0.patch

Remaining tasks

- Create a patch for the WxT composer.json file to include that patch mentioned above.

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Fixed

Version

5.0

Component

Code

Created by

🇨🇦Canada danrod Ottawa

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

Comments & Activities

Production build 0.71.5 2024