Problem/Motivation

Drupal core main (#3278431: [November 2026] Use PHP 8 constructor property promotion for existing code) declares ConfigEntityStorage::$languageManager as a typed promoted property: protected LanguageManagerInterface $languageManager. WebformEntityStorage redeclares it untyped, so PHP throws as soon as the class loads:

Type of Drupal\webform\WebformEntityStorage::$languageManager must be Drupal\Core\Language\LanguageManagerInterface (as in class Drupal\Core\Config\Entity\ConfigEntityStorage)

Every test that boots Webform fails on Drupal 12.

Proposed resolution

Remove the redeclaration. The parent declares the property on every core Webform supports: untyped on 10.3, 10.5 and 11.x, typed on 12. Webform keeps setting it in createInstance() as before.

A scan of Webform against core main found no other property clash of this kind.

Remaining tasks

  • Review the merge request.

#3592102: Fatal error: Type of WebformEntityStorage::$languageManager must not be defined is the same clash the other way round: a typed child against an untyped parent.

AI-Generated: Yes (Claude Code was used to find the cause, scan Webform for other clashes, write the fix and draft this issue summary. I reviewed them.)

Issue fork webform-3635342

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

mably created an issue. See original summary.

mably’s picture

Status: Active » Needs review