Calling a static method, or accessing a static property directly on a trait is deprecated

Created on 29 March 2022, over 2 years ago
Updated 19 July 2023, over 1 year ago

When I save a node using the textfield counter, on PHP 8.1, I get this error.

Deprecated function: Calling static trait method Drupal\textfield_counter\Plugin\Field\FieldWidget\TextFieldCounterWidgetTrait::getLengthOfSubmittedValue is deprecated, it should only be called on a class using the trait in Drupal\textfield_counter\Plugin\Field\FieldWidget\TextFieldCounterWidgetTrait::validateFieldFormElement() (line 352 of modules/contrib/textfield_counter/src/Plugin/Field/FieldWidget/TextFieldCounterWidgetTrait.php).

πŸ› Bug report
Status

Fixed

Version

2.1

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States daniel korte Brooklyn, NY

Live updates comments and jobs are added and updated live.
  • PHP 8.1

    The issue particularly affects sites running on PHP version 8.1.0 or later.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024