[D10] - php 8.1 deprecation fix for wxt_ext_media bulk upload

Created on 6 November 2023, about 1 year ago
Updated 13 November 2023, about 1 year ago

Problem/Motivation

Bulk upload throwing a deprecation warning message.

BEFORE PATCHING:

Deprecated function: Return type of Drupal\wxt_ext_media\Exception\IndeterminateBundleException::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in include() (line 13 of profiles/wxt/modules/custom/wxt_ext/wxt_ext_media/src/Exception/IndeterminateBundleException.php).

AND also:
Deprecated function: Return type of Drupal\wxt_ext_media\Exception\IndeterminateBundleException::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in include() (line 13 of profiles/wxt/modules/custom/wxt_ext/wxt_ext_media/src/Exception/IndeterminateBundleException.php).

Steps to reproduce

  • Using current wxt 5.0.x build
  • Step 1) enable detailed logging options to show errors and warnings /admin/config/development/logging
  • Step 2) /admin/content/media/bulk-upload
  • Step 3) select 2 or more files to upload
  • Step 4) press the continue button
  • Lots of warning messages about deprecations!

Proposed resolution

See patch

Remaining tasks

Review and commit patch

User interface changes

Minor

API changes

Minor

Data model changes

N/A

🐛 Bug report
Status

Fixed

Version

5.0

Component

Code

Created by

🇨🇦Canada joseph.olstad

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

Comments & Activities

Production build 0.71.5 2024