Remove AiDataTypeConverterPluginManager from Base class and load via trait
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3532517. --> Reported by: [marcus_johansson](https://www.drupal.org/user/385947) Related to !701 >>> <h3 id="summary-problem-motivation">Problem/Motivation</h3> <p><span class="drupalorg-gitlab-issue-link project-issue-status-info project-issue-status-7"><a href="https://www.drupal.org/project/ai/issues/3512100" title="Status: Closed (fixed)">#3512100: Create AI DataTypeConverter for complex data types</a></span> was merged, since its a very good feature for the action plugins, but due to it not being available for 1.1.0, this would constitue as a breaking change - we already know of products that have written 20-30+ tools that would need refactoring in 1.2.0 due to this change, which is not something we would want.</p> <p>So, we have to move this out from being loaded via the constructor and have it being loaded via a trait instead, and have that being used in the setContextValue override.</p> <h3 id="summary-proposed-resolution">Proposed resolution</h3> <p>1. Move out the data_type_converter_manager from the constructor.<br> 2. Create a trait that can load the dataTypeConverterManager service<br> 3. Load the dataTypeConverterManager via the trait in the setContextValue function.</p> <h3 id="summary-remaining-tasks">Remaining tasks</h3> <h3 id="summary-ui-changes">User interface changes</h3> <h3 id="summary-api-changes">API changes</h3> <h3 id="summary-data-model-changes">Data model changes</h3>
issue