Remove from DecoupledFieldFormatter classes the properties which do not respect the Plugin structure

Created on 29 October 2024, 5 months ago

Problem/Motivation

DecoupledFieldFormatter classes have properties attached to them, but they should not be there because it breaks the Plugin model.

Indeed, a plugin is instantiated for a view display and a field, not per content. So when a content references another one with the same entity type + bundle + view display, the properties are overwritten by the recursed content field.

Proposed resolution

Fix the model so that the methods are pure, or at least, have the least side effects as possible.

Remaining tasks

Commit the work. I've just finished it.

User interface changes

None.

API changes

All formatters now have a methods with a cacheable metadata argument that can collect cache metadata, which replaces the addProcessedFieldCacheTag method.

The $processedFieldCacheTags property has been removed, and all associated methods.

The $hasProcessedField property has been removed, and all associated methods.

The $processedFieldValue property has been removed, and all associated methods.

Data model changes

None.

📌 Task
Status

Active

Version

1.5

Component

Code

Created by

🇫🇷France dakwamine

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

Comments & Activities

Production build 0.71.5 2024