hiqdev/composer-ci-deps-plugin
Composer 安装命令:
composer require hiqdev/composer-ci-deps-plugin
包简介
Composer plugin for installing dependencies from the PRs
README 文档
README
This plugin is designed for CI/CD pipelines of a multi-repository project. When a project consists of multiple repositories, it is often necessary to test the changes in the dependencies of the project before merging them. This plugin helps to automate this process.
It allows to automatically patch the dependencies of the project based on the list of pull requests that are currentto be used inly being tested.
Limitations
- Currently, the plugin supports pull requests from:
- Public GitHub repositories
- Private GitLab repositories
- Only pull requests against the installed dependency versions are supported. It means that the plugin will not work if the pull request is against the feature branch, and you have the main repo branch installed as a dependency.
- If you already use cweagans/composer-patches, in your project, you should install this plugin with caution, as it was not tested in such an environment and may cause conflicts.
Supported environment variables
| Name | Description | Required? |
|---|---|---|
GITLAB_REPO_ACCESS_TOKEN |
Gitlab Access Token with read_api, read_repo grants. Make sure the token owner has access to the required repos. |
Required |
EXIT_ON_PATCHING_ERROR |
When set to 1, the plugin will exit with a non-zero code if an error occurs during patching. |
Optional |
Installation
composer require --dev hiqdev/composer-ci-deps-plugin
Usage
-
Create a
pull-requests.txtin the root of your project with the list of pull requests, one per line, for example:https://gitlab.com/ultimateretro/ultimateretro/-/merge_requests/49 https://github.com/hiqdev/php-billing/pull/94
The plugin will automatically detect the type of the pull requests.
-
Run
composer prp– this will download patches from the pull requests and apply them to the dependencies.
Development
The easiest way to test the plugin is to create a new project and require the plugin from the local path:
{
"repositories": [
{
"type": "path",
"url": "/path/to/composer-ci-deps-plugin"
}
],
"require-dev": {
"hiqdev/composer-ci-deps-plugin": "*"
}
}
Then you can run the plugin with the following command and enjoy the debugging with XDebug:
export XDEBUG_TRIGGER=1 export COMPOSER_ALLOW_XDEBUG=1 export GITLAB_REPO_ACCESS_TOKEN=<your GitLab access token> composer prp
hiqdev/composer-ci-deps-plugin 适用场景与选型建议
hiqdev/composer-ci-deps-plugin 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 327 次下载、GitHub Stars 达 1, 最近一次更新时间为 2025 年 01 月 28 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 hiqdev/composer-ci-deps-plugin 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 hiqdev/composer-ci-deps-plugin 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 327
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 10
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-01-28