Fatal error and deprecated code: StateFieldBuilder

Created on 25 August 2025, about 1 month ago

Problem/Motivation

  • Fatal error: Declaration of Drupal\state_machine\Plugin\diff\Field\StateFieldBuilder::build(Drupal\Core\Field\FieldItemListInterface $field_items) must be compatible with Drupal\diff\Plugin\diff\Field\CoreFieldBuilder::build(Drupal\Core\Field\FieldItemListInterface $field_items): array in /src/Plugin/diff/Field/StateFieldBuilder.php on line 24
  • RendererInterface::renderPlain() is deprecated in favour of ::renderInIsolation()

Steps to reproduce

I went into content revisions and try to Compare selected revisions and that errors appears.

Proposed resolution

  • Add 'array' as the function return type in build
  • Change renderPlain() into renderInIsolation()

Remaining tasks

N/A

User interface changes

N/A

API changes

N/A

Data model changes

N/A

🐛 Bug report
Status

Active

Version

2.0

Component

Code

Created by

🇵🇹Portugal saidatom Lisbon

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024