Allow override of Diff entity parsing results

Created on 18 April 2019, about 5 years ago
Updated 15 April 2024, 2 months ago

Problem/Motivation

In some use cases, developers may want to override the way that content entities are parsed to display a diff. For example, fields that are hidden on an entity's view display configuration are not included in the diff, but developers may still want a way to expose changes to those fields for users viewing the diff. A solution to this use case was addressed in Issue #2635852: Make the 'visible fields only' comparison configurable β†’ , but in the three years since that issue, the module has been rearchitected and the code enabling that approach is no longer part of this module.

Proposed resolution

The patch I am attaching introduces a new hook, hook_diff_parse_entity_alter(), which allows developers to alter the list of entity fields being used in a diff comparison.

Remaining tasks

Need community members to review and test the patch.

User interface changes

None.

API changes

Introduces a new hook, hook_diff_parse_entity_alter().

Data model changes

None.

Release notes snippet

Introduces a hook that allows developers to alter the array of entity fields used in \Drupal\diff\DiffEntityComparison.

✨ Feature request
Status

Needs review

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States danmuzyka

Live updates comments and jobs are added and updated live.
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.69.0 2024