mcpField
D
drupal-composer

drupal-composer

github.com/edutrulDevelopment7349 installsUpdated 21w ago
Repository

About drupal-composer

A reference skill for Drupal developers managing Composer dependencies. It covers module installation and updates, version constraints, patches, and useful validation and audit commands.

Key features

  1. 01Install and update Drupal modules
  2. 02Explain version constraint syntax
  3. 03Configure Composer patches
  4. 04List audit and validation commands

Use cases

  1. 01Add or upgrade a Drupal module
  2. 02Set dependency version ranges
  3. 03Apply patches to modules

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/edutrul/drupal-ai --skill drupal-composer

After installing, type/drupal-composerin Claude Code to confirm it loaded.

Bundled filesREADME.md

Details

From the project README

Drupal Composer Management

Installing & Updating

composer require drupal/module_name
composer require drupal/module_name:^2.0
composer require drupal/module_name:^1.0@dev
composer update drupal/module_name
composer update drupal/*
composer outdated drupal/*
composer audit

Version Constraints

ConstraintMeaning
^2.0>= 2.0.0 and < 3.0.0
~2.0>= 2.0.0 and < 2.1.0
2.x-devLatest 2.x dev branch
^1.0@dev>= 1.0 dev releases

Patches (composer-patches)

"extra": {
  "patches": {
    "drupal/module_name": {
      "Patch description - issue #1234567": "patches/module_name-patch-description.patch"
    },
    "drupal/tb_megamenu": {
      "Block content support": "patches/tb_megamenu-block-content-support.patch"
    }
  }
}

Patches apply on composer install and re-apply on composer update drupal/module_name.

Useful Commands

composer show drupal/module_name
composer validate
composer clear-cache
composer install --no-cache

Comments

Markdown supported