Circular Dependencies Management Assignement Plugin

Created on 16 March 2018, almost 7 years ago
Updated 29 May 2024, 7 months ago

Problem/Motivation

As see in some issues like : https://www.drupal.org/project/features/issues/2892627
or identify in study case : https://www.drupal.org/project/features/issues/2944801

In some content configuration, we can generate circular dependencies between exported features.
The issue #2892627 are the simplest way to reproduice it.

Proposed resolution

I create a new Assignement plugin which "clean" dependencies in field_instance configuration.

This assignement must be the last of assignement methods to avoid side effect with packaging generation.
This plugin only check field_instace configuration and delete all dependencies to entity_bundle exept the "parent bundle".

Exemple : a node field referencing a paragraph as 3 configurations as dependencies :
- the field_storage ( kept)
- the "parent bundle"( kept)
- the targeted paragraph ( deleted)

This way permit avoiding circular dependencies between entities( just two or severals levels) wihout cuting the install/update capacity.
The package of the node_bundle can be installed alone but the field won't working until the paragraph bundle are installed.

It's some like the D7 version of the module, field instance depend only from bundle which use it, no from the target entity.
I realize that not perfect ( see field_name problematic below) but it's work.

Remaining tasks

Another task will hunt a bug-like in "fields package assignement" ( instance and storage).

if we name a reference field like "ref_to_BUNDLE_TARGET", package assignement attach it in the package of the targeted_bundle.
ex : field "field_tags" (of standard "artcle" node type) referencing "tags" vocabulary.

If taxonomy vocabularies are defined as base_type, the "field.storage.node.field_tags" are attached to the "tags" package not the "article".
I don't know if it's a bug or not, but it can generate circular dependencies.

Feature request
Status

RTBC

Version

3.0

Component

Assignment Plugins

Created by

🇫🇷France DrDam

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.71.5 2024