bernardosilva/git-hooks-installer-plugin
Composer 安装命令:
composer require bernardosilva/git-hooks-installer-plugin
包简介
README 文档
README
This project goal is to share and enforce code standards to all your projects.
Why create this?
Currently there are millions of php projects that do not follow or adapt any code standards.
I think the main reasons for that are:
- Lack of time to implement a script to check them;
- Not sure how those will help;
- Not sure how to enforce them for all team members;
- Not aware of what that is;
Using git-hook packages will enable everyone to share their hooks and reduce de number of projects not following any standards.
git-hook package
A git-hook package is a composer package that uses the type git-hook.
Any package that set git-hook-installer-plugin as dependency and type to git-hook
will be installed on your project using this plugin.
Git-hook packages available
Create you own git-hook package to be listed here and share it with everyone.
How to create my git-hook packages?
You can start by looking into this example
Things required to create a new git-hook package?
-
composer.jsonfile. - The git hook files you want to use. view list of available hooks
Example of new composer.json file
{
"name": "yourname/your-package-name",
"type": "git-hook",
"description": "Composer git-hook package with hooks for your php projects.",
"require": {
"bernardosilva/git-hooks-installer-plugin": "^1.0.0"
}
}
Note: Your composer.json must have a specific type to be installed in correct directory:
"type": "git-hook"
Also your git hooks should have execution permission.
Available hooks
You can create any of those files on your package with execute permissions.
- applypatch-msg
- pre-applypatch
- pre-commit
- prepare-commit-msg
- commit-msg
- pre-rebase
- pre-push
- update
- post-update
See a list of all git hooks available
How to Install
php composer.phar require bernardosilva/git-hooks-installer-plugin
How to test
./vendor/bin/phpunit
How to contribute
-
Create your own git hook composer package.
-
Create a PR to list your package on this page.
-
Raise new issues or add suggestions to improve this plugin.
Created By
License
MIT © Bernardo Silva
bernardosilva/git-hooks-installer-plugin 适用场景与选型建议
bernardosilva/git-hooks-installer-plugin 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 62.08k 次下载、GitHub Stars 达 14, 最近一次更新时间为 2015 年 10 月 17 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 bernardosilva/git-hooks-installer-plugin 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 bernardosilva/git-hooks-installer-plugin 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 62.08k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 15
- 点击次数: 17
- 依赖项目数: 2
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-10-17