Problem/Motivation

As of PHP 8, static trait methods can't be called. This is happening here:

EntityReferenceDeltaFilterTrait::getFieldOptions($this->fieldDefinition),

Steps to reproduce

Try to load the formatter on the Manage Display of a node. It won't work because of the error:
Got error 'PHP message: PHP Deprecated: Calling static trait method Drupal\\entityreference_extensions\\EntityReferenceDeltaFilterTrait::getFieldOptions is deprecated, it should only be called on a class using the trait in web/modules/contrib/entityreference_extensions/src/EntityReferenceDeltaFilterTrait.php on line 224'

Proposed resolution

Replace the trait name by "self" in EntityReferenceDeltaFilterTrait.php:224

CommentFileSizeAuthor
#2 3317565-2.patch670 bytesfernly

Comments

Fernly created an issue. See original summary.

fernly’s picture

Status: Active » Needs review
StatusFileSize
new670 bytes

Attached a patch for fix.

  • stefan.korn committed 4e1ce3f on 8.x-1.x
    Issue #3317565 by Fernly: Calling static trait method...
stefan.korn’s picture

Status: Needs review » Fixed

Thanks, is fixed now.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.