Fixed
Project:
Select Text Value
Version:
2.x-dev
Component:
Code
Priority:
Major
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
1 Apr 2026 at 18:15 UTC
Updated:
1 Apr 2026 at 19:04 UTC
Jump to comment: Most recent
Convert deprecated @FieldWidget annotations to PHP 8 #[FieldWidget] attributes for Drupal 11 compatibility. Annotation-based plugin discovery is removed in Drupal 11, so the widgets are not discovered
at runtime despite the info.yml declaring ^11 support.
@FieldWidget annotation to #[FieldWidget] attribute@FieldWidget annotation to #[FieldWidget] attribute@FieldWidget annotation to #[FieldWidget] attribute@FieldWidget annotation to #[FieldWidget] attributelist($key, $value) with [$key, $value] array destructuring (minor cleanup)All four widget files need:
use Drupal\Core\Field\Attribute\FieldWidget;use Drupal\Core\StringTranslation\TranslatableMarkup;@FieldWidget(...) docblock with #[FieldWidget(...)] attribute@Translation("...") with new TranslatableMarkup('...')Safe for all supported versions — attribute discovery works in Drupal 10.2+, and core_version_requirement already requires ^10.3.
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
Comment #3
andyg5000Comment #5
mably commentedMerged. Thanks @andyg5000!