Ensure module dependencies are an array in .info.yml

Created on 21 August 2020, almost 4 years ago
Updated 7 March 2023, over 1 year ago

Problem/Motivation

The dependencies in a module's .info.yml file must be an array. I mistakenly added a single dependency as a string, which is valid yaml, and spent far too long debugging issues installing a site from existing config. I'm wondering how I could have prevented this and thought perhaps coder could detect this. Alternatively Drupal could allow a string OR array. Ultimately this was just a dumb mistake.

Steps to reproduce

Create a module with a single dependency not in an array:

dependencies:
  drupal:taxonomy

Proposed resolution

Detect this pattern

Remaining tasks

Determine if this is appropriate for coder

User interface changes

N/A

API changes

N/A

Data model changes

N/A

✨ Feature request
Status

Fixed

Version

3.0

Component

Coder Sniffer

Created by

πŸ‡¦πŸ‡ΊAustralia mstrelan

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024