Add dependencies for sub-modules
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3494923. -->
Reported by: [abhinesh](https://www.drupal.org/user/3645979)
>>>
<h3 id="summary-problem-motivation">Problem/Motivation</h3>
<p>The AI module submodules rely on other contributed modules for their functionality, but these dependencies are not declared in the <code>composer.json</code> file. This can lead to issues when installing the AI module via Composer, as the required dependencies are not automatically installed.</p>
<h4 id="summary-steps-reproduce">Steps to reproduce</h4>
<ol>
<li>Install the AI module via Composer without manually including its dependencies.</li>
<li>Enable the AI-related submodules (e.g., AI Validations, AI ECA Integration, AI Automators, AI Search).</li>
<li>Observe errors or missing functionality due to unresolved dependencies.</li>
</ol>
<h3 id="summary-proposed-resolution">Proposed resolution</h3>
<p>Update the AI module's <code>composer.json</code> file to include the following dependencies:</p>
<ul>
<li><strong>AI Validations</strong> - Add <code>drupal/field_validation</code>.</li>
<li><strong>AI ECA Integration</strong> - Add <code>drupal/eca</code>.</li>
<li><strong>AI Automators</strong> - Add <code>drupal/token</code>.</li>
<li><strong>AI Search</strong> - Add <code>drupal/search_api</code>.</li>
</ul>
<p>This ensures that when the AI module is installed via Composer, all required dependencies are automatically included.</p>
<h3 id="summary-remaining-tasks">Remaining tasks</h3>
<ul>
<li>Add the necessary dependencies to the <code>composer.json</code> file of the AI module:</li>
</ul><pre><pre> {<br> "require": {<br> "drupal/field_validation": "^3.0@beta",<br> "drupal/eca": "^2.0",<br> "drupal/token": "^1.15",<br> "drupal/search_api": "^1.37"<br> }<br> }<br> </pre></pre><li>Commit and push the updated <code>composer.json</code> file.</li>
<li>Test the installation of the AI module via Composer to verify that all dependencies are correctly installed.</li>
<h3 id="summary-ui-changes">User interface changes</h3>
<p>No direct user interface changes. Dependencies will be automatically handled, improving the installation experience for administrators.</p>
<h3 id="summary-api-changes">API changes</h3>
<p>No changes to the existing APIs.</p>
<h3 id="summary-data-model-changes">Data model changes</h3>
<p>No changes to the data model.</p>
<p>```</p>
issue