Problem/Motivation

DynamicEntityReferenceOptionsTrait supplies the massageFormValues() method. When it is consumed by DynamicEntityReferenceOptionsButtonsWidget and DynamicEntityReferenceOptionsSelectWidget it ultimately overrides OptionsWidgetBase.

Drupal 12 changed OptionsWidgetBase's massageFormValues to declare an : array return type

Steps to reproduce

While testing out Drupal 12.0.0-beta2 and DER 3.2.3 database updates loaded the widget while processing field-display configuration, exposing the signature incompatibilty.

Proposed resolution

Add : array to DynamicEntityReferenceOptionsTrait::massageFormValues() so its signature matches Drupal core's OptionsWidgetBase.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

thursday_bw created an issue. See original summary.

thursday_bw’s picture

Status: Active » Needs review

larowlan’s picture

Version: 3.2.3 » 4.x-dev
Status: Needs review » Patch (to be ported)

Need a v4 and v5 equivalent so updating status

v3 is committed

thursday_bw’s picture

Status: Patch (to be ported) » Needs review

V4 and 5 ports now have MRs !64 and !63 respectively.
There's PHPStan issues in the existing branches.

larowlan’s picture

Status: Needs review » Fixed

thanks Bevan, merged those two as well

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.