PHPackages                             juizmill/git-hooks - 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. juizmill/git-hooks

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

juizmill/git-hooks
==================

Git Hooks

2.0.3(9y ago)28336[2 issues](https://github.com/juizmill/git-hooks/issues)MITPHP

Since Aug 8Pushed 9y ago4 watchersCompare

[ Source](https://github.com/juizmill/git-hooks)[ Packagist](https://packagist.org/packages/juizmill/git-hooks)[ Docs](https://github.com/juizmill/git-hooks)[ RSS](/packages/juizmill-git-hooks/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (9)Dependencies (5)Versions (10)Used By (0)

Git Hooks
=========

[](#git-hooks)

Checks list

- Syntax check with php lint (“php -l”): We check every committed file has a valid PHP syntax.
- Sync check of composer.json and composer.lock files: We check these two files are committed together in order to avoid committing the json but not the lock and generate some issue to another developers.
- PHP CS Fixer check: With the –dry-run parameter it does not fix, just say what the problems are. With the –fixers parameter you can control what fixers you want to execute.
- PHP Code Sniffer check: Same as before, but another rule that checks another rules.
- PHPMD: We have enabled the controversial rules.
- Unit Testing check: We run around 3.000 tests right now.

[![PHPCsFix](images/PHPCsFix.jpg "PHPCsFix")](images/PHPCsFix.jpg)

[![PHPLint](images/PHPLint.jpg "PHPLint")](images/PHPLint.jpg)

[![PHPUnit](images/PHPUnit.jpg "PHPUnit")](images/PHPUnit.jpg)

**INSTALLATION:**

The recommended way to install this library is through [Composer](http://getcomposer.org):

add `juizmill/git-hooks` as a composer dependency.

composer.json

```
"require-dev": {
    ...
    "juizmill/git-hooks": "dev-master"
}
```

`php composer.phar update juizmill/git-hooks`

**USAGE:**

When a developer clones the project, it just needs to:

Edit composer.json and add:

```
    "scripts": {
        "pre-update-cmd": "GitHooks\\Composer\\Script\\Hooks::preHooks",
        "pre-install-cmd": "GitHooks\\Composer\\Script\\Hooks::preHooks",
        "post-update-cmd": "GitHooks\\Composer\\Script\\Hooks::postHooks",
        "post-install-cmd": "GitHooks\\Composer\\Script\\Hooks::postHooks"
    }

```

Remembering to set up the hooks

Custom config
-------------

[](#custom-config)

Copy arquives `vendor/juizmill/git-hooks/config/*` to \[project\]

Reference
---------

[](#reference)

[Write your git hooks in PHP and keep them under git control](http://carlosbuenosvinos.com/write-your-git-hooks-in-php-and-keep-them-under-git-control/)

[PHP\_CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer/wiki/Annotated-ruleset.xml)

[PHP-CS-FIX](http://cs.sensiolabs.org/)

[PHPMD](http://phpmd.org/documentation/index.html)

[Custom PHPCS and PHPMD](http://edorian.github.io/php-coding-standard-generator/#phpmd)

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity69

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~61 days

Recently: every ~121 days

Total

9

Last Release

3445d ago

Major Versions

1.0.4 → 2.0.02016-11-21

### Community

Maintainers

![](https://www.gravatar.com/avatar/01399a69d16f1084c9111c02387bdd3ebb023d8929f1235c9be784ffdd100552?d=identicon)[juizmill](/maintainers/juizmill)

---

Top Contributors

[![juizmill](https://avatars.githubusercontent.com/u/1959742?v=4)](https://github.com/juizmill "juizmill (20 commits)")

### Embed Badge

![Health badge](/badges/juizmill-git-hooks/health.svg)

```
[![Health](https://phpackages.com/badges/juizmill-git-hooks/health.svg)](https://phpackages.com/packages/juizmill-git-hooks)
```

###  Alternatives

[bruli/php-git-hooks

Git hooks for PHP projects.

675370.8k5](/packages/bruli-php-git-hooks)[ec-europa/toolkit

Toolkit packaged for Drupal projects based on Robo.

38244.6k16](/packages/ec-europa-toolkit)

PHPackages © 2026

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