ccinn/husky-php 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

ccinn/husky-php

最新稳定版本:v0.4.2

Composer 安装命令:

composer require ccinn/husky-php

包简介

Similar to js-husky client git hook implementation

关键字:

README 文档

README

Latest Stable Version Total Downloads Latest Unstable Version License PHP Version Require

PHP is combined with composer to implement functionality similar to js's NPM module husky

Git hooks made easy

Husky can prevent bad git commit, git push and more git's hooks

Code Contributors

This project exists thanks to all the people who contribute. [Contribute].

Branch

  • v5.6-7.3.x => "ccinn/husky-php": "^0.1.0"
  • v7.4 => "ccinn/husky-php": "^0.2.0"
  • v8.0.0 => "ccinn/husky-php": "^0.4.0"

Install

In composer.json

    "require-dev": {
        "ccinn/composer-husky-plugin": "^0.1.0",
        "ccinn/husky-php": "^0.4.0"
    },

Or

In Shell

composer require --dev ccinn/composer-husky-plugin ccinn/husky-php

Docker

docker build --build-arg PHP_VERION=8.0.9 -t husky-php .

Usage

you can also configure hooks using .huskyrc or .huskyrc.json file.

// .huskyrc or .huskyrc.json
{
  "hooks": {
    "pre-commit": "echo 'husky-php-pre-commit'",
    "pre-push": "echo 'husky-php-pre-push'",
    "...": "..."
  }
}

Running the git action hooks will be triggered

git commit -m 'Keep calm and commit'

You will see

husky-php-pre-commit

Default

By default, the pre - commit

Default support features:

  1. Detect code conflicts

  2. Test code specifications

  3. Check code syntax

Window User

You need run in bash environment, for example:GitBash

统计信息

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

GitHub 信息

  • Stars: 66
  • Watchers: 2
  • Forks: 10
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-05-09