Problem/Motivation

#2171395: OptionsWidgetBase should use WidgetInterface::massageFormValues() breaks webform module due to the return type. I think we should not add return types to new methods on base classes that expected to be subclassed.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Issue fork drupal-3626122

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

berdir created an issue. See original summary.

berdir’s picture

Status: Active » Needs review
smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Going to mark but I'm 50/50, it's a new method so if ever a good time to get the return type in wouldn't it be now? Will see what committers think, fine either way.

mstrelan’s picture

Maybe we can just revert it from 11.x?

berdir’s picture

> Going to mark but I'm 50/50, it's a new method so if ever a good time to get the return type in wouldn't it be now? Will see what committers think, fine either way.

It's a new method, but it's on a base class and implements an interface, so most subclasses already have it too and then it's like changing an existing one.

No strong opinion on revert on 11.x or not, I didn't look at thee original issue closely enough if it fixed any problems or was pure refactoring.

mstrelan’s picture

Version: main » 11.x-dev

Discussed in Slack with @catch and we agreed we can probably do this in 11.x and leave the return type in main / 12.0.x.

  • longwave committed a0048999 on 11.x
    fix: #3626122 Remove return type from OptionsWidgetBase::...
longwave’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed a004899978e to 11.x. Thanks!

Doesn't need to go to 12.0.x/main as discussed, and wasn't present in 11.4.x either, so this is the only branch that needs fixing.

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.

longwave’s picture

Issue tags: +Rotterdam2026