kyprss/merge-autoload-dev
最新稳定版本:v1.0.0-beta4
Composer 安装命令:
composer require kyprss/merge-autoload-dev
包简介
Composer plugin to merge autoload-dev settings from local package composer.json to root composer.json
README 文档
README
A Composer plugin that automatically merges autoload-dev configurations from local packages into the root composer.json.
Why?
When working on a monolithic project structured into modules via local Composer packages, the autoload-dev settings from sub-packages are not loaded by default.
As a result, test helpers inside a module are not automatically available.
This plugin merges those configurations so that your test helpers become accessible when running the project's tests.
Installation
composer require kyprss/merge-autoload-dev --dev
Configuration
Add the following to your root composer.json:
{
"extra": {
"merge-autoload-dev": {
"include": [
"modules/*/composer.json"
]
}
}
}
Configuration Options
- include (array): Glob patterns for composer.json files to scan and merge
How It Works
- The plugin scans all files matching the
includepatterns - For each
composer.jsonfile found, it reads theautoload-devconfiguration - It merges all found autoload-dev configurations into the root project's autoload-dev
- The merged configuration is automatically applied when running composer commands
Example
Given the following structure:
project/
├── composer.json
├── modules/
│ ├── module-a/
│ │ └── composer.json (with autoload-dev)
│ └── module-b/
│ └── composer.json (with autoload-dev)
统计信息
- 总下载量: 2.29k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-08-11