承接 szeidler/composer-drupal-unused 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

szeidler/composer-drupal-unused

Composer 安装命令:

composer require szeidler/composer-drupal-unused

包简介

README 文档

README

The Composer Drupal Unused package returns a list of Drupal Composer Packages that are not installed in your Drupal installation.

This plugin does not require a fully installed and boostrapped Drupal installation. It just parses the composer.json and typical configuration files in Drupal.

Requirements

  • PHP 8.1 or greater
  • Composer

Installation

Add Composer Drupal Unused as a composer dependency.

composer require szeidler/composer-drupal-unused:^1.0

or global

composer global require szeidler/composer-drupal-unused:^1.0

Usage

List unused Drupal packages

composer unused-drupal-packages

The command accepts the following options.

  • --config-dir Define the path to your config directory. Defaults to config/sync.
  • --remove Removes the identified unused packages from composer.lock and composer.json.

The command will list up Drupal packages that are declared as root level dependencies your composer.json, but not enabled in Drupal.

It will look up the core.extension.yml from the given Drupal Configuration Management directory. In addition it will look up config_split config files to see if a module is conditionally enabled.

Remove option

You should be careful using the plugin using the --remove function. Always review the changes. There might be edge cases where the Composer package name does not match the Drupal module machine name. The script would identify the package as unused and therefore delete it.

Credits

Stephan Zeidler for Ramsalt Lab AS

License

The MIT License (MIT)

统计信息

  • 总下载量: 579
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-01-15