PHPackages                             ccinn/husky-php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. ccinn/husky-php

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

ccinn/husky-php
===============

Similar to js-husky client git hook implementation

v0.4.2(3y ago)6927.5k↓34.7%10[3 issues](https://github.com/whiteCcinn/husky-php/issues)1MITPHPPHP &gt;=8.0CI failing

Since May 9Pushed 3y ago2 watchersCompare

[ Source](https://github.com/whiteCcinn/husky-php)[ Packagist](https://packagist.org/packages/ccinn/husky-php)[ Docs](https://github.com/whiteCcinn/husky-php)[ RSS](/packages/ccinn-husky-php/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (10)Dependencies (4)Versions (16)Used By (1)

PHP Husky 🐺
===========

[](#php-husky-)

[![Latest Stable Version](https://camo.githubusercontent.com/6114957102c54807af972c604f50679e34d849a35cc6cf1d84cc4b3b2fdc8dd3/687474703a2f2f706f7365722e707567782e6f72672f6363696e6e2f6875736b792d7068702f76)](https://packagist.org/packages/ccinn/husky-php)[![Total Downloads](https://camo.githubusercontent.com/cd0627e3437c30145fed9499c2084cd8ae6388e060553222a7779ec4478059c0/687474703a2f2f706f7365722e707567782e6f72672f6363696e6e2f6875736b792d7068702f646f776e6c6f616473)](https://packagist.org/packages/ccinn/husky-php)[![Latest Unstable Version](https://camo.githubusercontent.com/863e67f40ad637567ba434d52e04e3b25857bf99ba98765161d6d19d6ad04e27/687474703a2f2f706f7365722e707567782e6f72672f6363696e6e2f6875736b792d7068702f762f756e737461626c65)](https://packagist.org/packages/ccinn/husky-php)[![License](https://camo.githubusercontent.com/30949257d8bdbe6c3f422392ecf277839a8e11369e30648bc8f394540d8a58fb/687474703a2f2f706f7365722e707567782e6f72672f6363696e6e2f6875736b792d7068702f6c6963656e7365)](https://packagist.org/packages/ccinn/husky-php)[![PHP Version Require](https://camo.githubusercontent.com/5e120e7ea3684d111c985477d8e0a7827f2f7fe2977606a3e0322780a4238201/687474703a2f2f706f7365722e707567782e6f72672f6363696e6e2f6875736b792d7068702f726571756972652f706870)](https://packagist.org/packages/ccinn/husky-php)

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
-----------------

[](#code-contributors)

This project exists thanks to all the people who contribute. \[[Contribute](https://github.com/whiteCcinn/husky-php/graphs/contributors)\]. [![](https://camo.githubusercontent.com/7787f145987753008a5842298ea65298530349d62cf0b57bfaa3e2c723ee691d/68747470733a2f2f6f70656e636f6c6c6563746976652e636f6d2f6875736b792d7068702f636f6e7472696275746f72732e7376673f77696474683d38393026627574746f6e3d66616c7365)](https://github.com/whiteCcinn/husky-php/graphs/contributors)

Branch
------

[](#branch)

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

Install
-------

[](#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)

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

```

Usage
-----

[](#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
-------

[](#default)

By default, the pre - commit

Default support features:

1. Detect code conflicts
2. Test code specifications
3. Check code syntax

Window User
-----------

[](#window-user)

You need run in `bash` environment, for example：`GitBash`

###  Health Score

38

—

LowBetter than 83% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity41

Moderate usage in the ecosystem

Community18

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 85.4% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~122 days

Recently: every ~127 days

Total

12

Last Release

1272d ago

Major Versions

v0.2.1 → v7.4.x-dev2021-08-17

v7.4.x-dev → v8.0.x-dev2021-08-17

PHP version history (3 changes)v0.2.0PHP &gt;=7.4

v0.1.1PHP &gt;=7

v0.3.2PHP &gt;=8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/69c5499d6c0cfaf088d63b3f9cb7ccff477dbd76c3d38536d78c6e960d7b4fc6?d=identicon)[ccinn](/maintainers/ccinn)

---

Top Contributors

[![whiteCcinn](https://avatars.githubusercontent.com/u/13690966?v=4)](https://github.com/whiteCcinn "whiteCcinn (41 commits)")[![idleberg](https://avatars.githubusercontent.com/u/1504938?v=4)](https://github.com/idleberg "idleberg (4 commits)")[![Trusted97](https://avatars.githubusercontent.com/u/37697178?v=4)](https://github.com/Trusted97 "Trusted97 (2 commits)")[![pawel-grzona](https://avatars.githubusercontent.com/u/285337?v=4)](https://github.com/pawel-grzona "pawel-grzona (1 commits)")

---

Tags

composer-husky-pluginhuskyhusky-phpphphusky

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/ccinn-husky-php/health.svg)

```
[![Health](https://phpackages.com/badges/ccinn-husky-php/health.svg)](https://phpackages.com/packages/ccinn-husky-php)
```

###  Alternatives

[composer/composer

Composer helps you declare, manage and install dependencies of PHP projects. It ensures you have the right stack everywhere.

29.5k196.2M3.1k](/packages/composer-composer)[friendsofphp/php-cs-fixer

A tool to automatically fix PHP code style

13.5k251.2M25.2k](/packages/friendsofphp-php-cs-fixer)[friendsoftypo3/content-blocks

TYPO3 CMS Content Blocks - Content Types API | Define reusable components via YAML

103519.9k53](/packages/friendsoftypo3-content-blocks)[phpro/soap-client

A general purpose SoapClient library

8896.1M54](/packages/phpro-soap-client)[shlinkio/shlink

A self-hosted and PHP-based URL shortener application with CLI and REST interfaces

5.1k5.2k](/packages/shlinkio-shlink)[api-platform/openapi

Models to build and serialize an OpenAPI specification.

404.8M94](/packages/api-platform-openapi)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
