Formatter not discovered in Drupal 10.2.7

Created on 19 May 2025, 18 days ago

Problem/Motivation

I'm running Drupal 10.2.7.

I've installed the module but the formatter is not appearing as an option.

If I look at WhatsappNumberFormatter.php I can see the warning Undefined class 'FieldFormatter'

I thought Attributes as opposed to annotation was supported from Drupal 10.2+, however looking in core/lib/Drupal/Core/Field I can see there is no Attribute folder, just an Annotation one.

My IDE cannot find any alternative classes to import.

Steps to reproduce

Try to use this module on 10.2.x.

Proposed resolution

Provide a patch using Annotation for people still on 10.2.x.

🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

🇬🇧United Kingdom dahousecat

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024