Install contrib module dependencies specified in info.yml file (when no composer.json file exists)

Created on 3 November 2023, 8 months ago
Updated 5 November 2023, 8 months ago

Problem/Motivation

The GitLab CI template currently does not install contrib module dependencies specified in .info.yml file if the composer.json file is not present.
This may affect phpstan and phpunit steps causing failures.

The composer.json file is currently not mandatory for contrib modules and is automatically generated for modules releases on Drupal.org. Many maintainers relies on this behavior to avoid maintaining the separate composer.json file.

As a workaround, the module maintainer may either add a composer.json file or add a section to their .gitlab-ci.yml file to manually install dependencies in composer/after_script, e.g.:

composer:
  after_script:
    - composer require 'drupal/other_custom_module'

However, it would be great if this would be handled automatically.

Steps to reproduce

1. Run a pipeline for a contrib module having dependency on another contrib module.
2. Check the composer job log.
Expected: there are log records about dependencies being installed.
Actual: dependencies from .info.yml file aren't installed.

Proposed resolution

Update the template to handle automatic installation of contrib module dependencies.

✨ Feature request
Status

Closed: won't fix

Component

gitlab-ci

Created by

πŸ‡ΊπŸ‡¦Ukraine abramm Lutsk

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

Comments & Activities

Production build 0.69.0 2024