bitexpert/captainhook-infection
Composer 安装命令:
composer require bitexpert/captainhook-infection
包简介
Captain Hook Plugin to run InfectionPHP only against the files of the current changeset
README 文档
README
This package provides an action for Captain Hook which will invoke InfectionPHP for all changed files of a commit. Running Infection only against the changed files will result in a faster execution of Infection which is ideal when running it as a pre-commit hook.
Installation
The preferred way of installing bitexpert/captainhook-infection is through Composer.
You can add bitexpert/captainhook-infection as a dev dependency, as follows:
composer.phar require --dev bitexpert/captainhook-infection
Usage
Add the following code to your captainhook.json configuration file:
{
"pre-commit": {
"enabled": true,
"actions": [
{
"action": "\\bitExpert\\CaptainHook\\Infection\\InfectionAction"
}
]
}
}
By default, the action will invoke ./vendor/bin/infection as a command. If you need to customize the path, e.g. because
you installed the .phar distribution you can do so by passing a infection configuration option to the action.
{
"pre-commit": {
"enabled": true,
"actions": [
{
"action": "\\bitExpert\\CaptainHook\\Infection\\InfectionAction",
"options": {
"infection": "php infection.phar"
}
}
]
}
}
To pass additional parameters to Infection, e.g. to define the number of threads used by Infection, supply an args array option like this:
{
"pre-commit": {
"enabled": true,
"actions": [
{
"action": "\\bitExpert\\CaptainHook\\Infection\\InfectionAction",
"options": {
"args": [
"-j4"
]
}
}
]
}
}
Contribute
Please feel free to fork and extend existing or add new features and send a pull request with your changes! To establish a consistent code quality, please provide unit tests for all your changes and adapt the documentation.
Want To Contribute?
If you feel that you have something to share, then we’d love to have you. Check out the contributing guide to find out how, as well as what we expect from you.
License
Captain Hook Infection Action is released under the Apache 2.0 license.
bitexpert/captainhook-infection 适用场景与选型建议
bitexpert/captainhook-infection 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 5.21k 次下载、GitHub Stars 达 11, 最近一次更新时间为 2021 年 01 月 30 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 bitexpert/captainhook-infection 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 bitexpert/captainhook-infection 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 5.21k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 12
- 点击次数: 24
- 依赖项目数: 6
- 推荐数: 0
其他信息
- 授权协议: Apache-2.0
- 更新时间: 2021-01-30