flowdrop_node_type config entities do not declare module dependencies for executor plugins
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3583422. --> Reported by: [d34dman](https://www.drupal.org/user/751698) >>> <h3 id="summary-problem-motivation">Problem/Motivation</h3> <p> When a <code>flowdrop_node_type</code> config entity is configured with an<br> executor plugin that follows the namespaced convention<br> <code>{provider}:{plugin_id}</code> (e.g. <code>my_module:my_executor</code>),<br> the provider module is not recorded as a config dependency on the entity. </p> <p> This means Drupal's config dependency system is unaware of the relationship.<br> If the provider module is uninstalled, the related <code>flowdrop_node_type</code><br> entities are not cleaned up automatically &mdash; potentially leaving broken config<br> in the active storage that references a plugin that no longer exists. </p> <h4 id="summary-steps-reproduce">Steps to reproduce</h4> <ol> <li>Create a <code>flowdrop_node_type</code> config entity and assign it an executor plugin from a contributed or custom module (e.g. <code>my_module:my_executor</code>).</li> <li>Export config and inspect the entity's <code>dependencies.module</code> key &mdash; the provider module (<code>my_module</code>) is absent.</li> <li>Uninstall the provider module. Notice the node type entity is not removed and may reference an unavailable plugin.</li> </ol> <h3 id="summary-proposed-resolution">Proposed resolution</h3> <p> Override <code>calculateDependencies()</code> in <code>FlowDropNodeType</code><br> to detect the namespaced plugin ID convention and register the provider as a<br> <code>module</code> dependency. String parsing is used intentionally (rather<br> than resolving through the plugin manager) to keep the method safe during<br> module install/uninstall transitions. </p> <p> An update hook (<code>flowdrop_node_type_update_10002()</code>) re-saves all<br> existing <code>flowdrop_node_type</code> entities so the new dependency<br> information is written into active config storage for sites upgrading from a<br> prior release. </p> <h3 id="summary-remaining-tasks">Remaining tasks</h3> <ul> <li>Review and commit the patch.</li> <li>Add test coverage: verify that a node type's config dependencies include the executor plugin's provider module after save.</li> </ul> <h3 id="summary-ui-changes">User interface changes</h3> <p>None.</p> <h3 id="summary-api-changes">API changes</h3> <p> <code>FlowDropNodeType::calculateDependencies()</code> is now overridden.<br> This is an additive change &mdash; it does not alter the method signature or break<br> existing behaviour for entities with no executor plugin or a non-namespaced<br> plugin ID. </p> <h3 id="summary-data-model-changes">Data model changes</h3> <p> Existing <code>flowdrop_node_type</code> config entities will gain a<br> <code>dependencies.module</code> entry for the executor plugin's provider<br> after running the <code>10002</code> update hook or re-saving the entity.<br> This is a non-breaking addition to the stored config structure. </p>
issue