Add dependencies for sub-modules

Created on 19 December 2024, 3 days ago

Problem/Motivation

The AI module submodules rely on other contributed modules for their functionality, but these dependencies are not declared in the composer.json file. This can lead to issues when installing the AI module via Composer, as the required dependencies are not automatically installed.

Steps to reproduce

  1. Install the AI module via Composer without manually including its dependencies.
  2. Enable the AI-related submodules (e.g., AI Validations, AI ECA Integration, AI Automators, AI Search).
  3. Observe errors or missing functionality due to unresolved dependencies.

Proposed resolution

Update the AI module's composer.json file to include the following dependencies:

  • AI Validations - Add drupal/field_validation.
  • AI ECA Integration - Add drupal/eca.
  • AI Automators - Add drupal/token.
  • AI Search - Add drupal/search_api.

This ensures that when the AI module is installed via Composer, all required dependencies are automatically included.

Remaining tasks

  • Add the necessary dependencies to the composer.json file of the AI module:
  {
      "require": {
          "drupal/field_validation": "^3.0@beta",
          "drupal/eca": "^2.0",
          "drupal/token": "^1.15",
          "drupal/search_api": "^1.37"
      }
  }
  
  • Commit and push the updated composer.json file.
  • Test the installation of the AI module via Composer to verify that all dependencies are correctly installed.
  • User interface changes

    No direct user interface changes. Dependencies will be automatically handled, improving the installation experience for administrators.

    API changes

    No changes to the existing APIs.

    Data model changes

    No changes to the data model.

    ```

    💬 Support request
    Status

    Active

    Version

    1.0

    Component

    Other Submodules

    Created by

    🇮🇳India abhinesh

    Live updates comments and jobs are added and updated live.
    Sign in to follow issues

    Comments & Activities

    • Issue created by @abhinesh
    • 🇬🇧United Kingdom scott_euser

      It's been flagged before that too many dependencies get loaded unnecessarily, maybe the better approach is:

      • composer suggest to recommend additional dependencies
      • hook requirements to prevent install until the required dependencies are in place
    • 🇬🇧United Kingdom MrDaleSmith

      I agree the composer suggest method is better, but should also point out you already can't install a module if its dependencies aren't there so there's no need to do any additional work on that count.

    Production build 0.71.5 2024