定制 nmangold/composer-remedy 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

nmangold/composer-remedy

Composer 安装命令:

composer require nmangold/composer-remedy

包简介

A Composer plugin to automatically detect and resolve dependency conflicts, with a focus on Drupal projects.

README 文档

README

A production-quality Composer plugin that automatically detects and resolves dependency conflicts, with a strong focus on Drupal projects.

🎯 Features

  • Programmatic Conflict Analysis: Uses Composer's internal solver to detect conflicts accurately.
  • Dependency Graph Building: Maps out the relationships between conflicting packages.
  • Minimal Resolution Planning: Computes the smallest set of version changes required to fix conflicts.
  • Risk Assessment: Classifies the risk level of suggested changes (LOW, MEDIUM, HIGH, EXTREME).
  • Drupal Integration: Specific rules for drupal/core and drupal/core-recommended.
  • Dry-run and Auto-apply: See the plan or apply it automatically.

📦 Installation

composer require nmangold/composer-remedy

⚙️ Usage

When you encounter a dependency conflict, run:

composer drupal:fix-conflicts

Options

  • --dry-run: Show the resolution plan without making any changes.
  • --apply: Automatically execute composer require with the computed version fixes.

🛠 Architecture

The plugin follows SOLID principles and uses a service-oriented architecture:

  • ConflictAnalyzer: Triggers a simulated update to capture SolverProblemsException.
  • DependencyGraphBuilder: Constructs a graph of involved packages.
  • ResolutionPlanner: Iteratively relaxes constraints to find a valid resolution.
  • RiskAnalyzer: Evaluates the impact of version bumps.
  • DrupalAnalyzer: Applies Drupal-specific logic for core and modules.

🧪 Testing

Run the test suite with PHPUnit:

vendor/bin/phpunit

🛡 License

This project is licensed under the MIT License.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-04-15

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固