Use service decoration to replace media_library.opener.field_widget

Created on 8 May 2024, 6 months ago
Updated 28 May 2024, 6 months ago

Problem/Motivation

On 10.3.x Thunder tests are failing with media_library.opener.field_widget must be an instance of Drupal\media_library\MediaLibraryOpenerInterface.

I'm pretty sure that this is due to the πŸ“Œ Convert OpenerResolver to use a service locator Fixed and πŸ“Œ Add default autoconfigure to all *.services.yml and remove event_subscriber tags Fixed change. The move to use Symfony's service locator and autoconfiguration means that the way this module just overrides the service definition by doing:

  media_library.opener.field_widget:
    class: Drupal\media_library_media_modify\MediaLibraryMediaModifyFieldWidgetOpener
    arguments: [ '@entity_type.manager' ]

just does not work.

Steps to reproduce

Run Thunder tests on Drupal 10.3.x

Proposed resolution

Use service decoration to preserve the ability of the container to autowire.

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡¬πŸ‡§United Kingdom alexpott πŸ‡ͺπŸ‡ΊπŸŒ

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