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

ActiveGit-hook[Utility &amp; Helpers](/categories/utility)

bernardosilva/git-hooks-php
===========================

Composer git-hook package with hooks for your php projects.

2.2.0(8y ago)2516.7k21MITShell

Since Oct 18Pushed 8y ago3 watchersCompare

[ Source](https://github.com/BernardoSilva/git-hooks-php)[ Packagist](https://packagist.org/packages/bernardosilva/git-hooks-php)[ RSS](/packages/bernardosilva-git-hooks-php/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (2)Versions (27)Used By (1)

git-hooks-php
=============

[](#git-hooks-php)

[![Latest Stable Version](https://camo.githubusercontent.com/987f494533a4d8b3b2a91bfd392e5a4ccb8d00990a01dfbdb1b6a1a03e999ba0/68747470733a2f2f706f7365722e707567782e6f72672f6265726e6172646f73696c76612f6769742d686f6f6b732d7068702f762f737461626c65)](https://packagist.org/packages/bernardosilva/git-hooks-php)[![Monthly Downloads](https://camo.githubusercontent.com/1b9912595cc0befa72f157c7ed0b610af77b3b0198262703308ec21fdde6f638/68747470733a2f2f706f7365722e707567782e6f72672f6265726e6172646f73696c76612f6769742d686f6f6b732d7068702f642f6d6f6e74686c79)](https://packagist.org/packages/bernardosilva/git-hooks-php)[![Total Downloads](https://camo.githubusercontent.com/a843cd0364c804af10e959f96f637dadfecc7374494604f31922753b8bea95ba/68747470733a2f2f706f7365722e707567782e6f72672f6265726e6172646f73696c76612f6769742d686f6f6b732d7068702f646f776e6c6f616473)](https://packagist.org/packages/bernardosilva/git-hooks-php)[![License](https://camo.githubusercontent.com/0e04dc3137248417f64a7f10e50a3f3e177a6740d94930d1c1214c584714e7a9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6265726e6172646f73696c76612f6769742d686f6f6b732d7068702e737667)](https://packagist.org/packages/bernardosilva/git-hooks-php)

This is a [`git-hook` package](https://github.com/BernardoSilva/git-hooks-installer-plugin#git-hook-package) that contains some standards I want to use on all my PHP projects.

I use the git `pre-commit` hook to validate all my code before every commit to ensure that my code is always valid.

[View how to create your own git-hook package](https://github.com/BernardoSilva/git-hooks-installer-plugin#how-to-create-my-git-hook-packages)

How to install
--------------

[](#how-to-install)

Just add this package as a dependency on your project.

```
php composer.phar require --dev bernardosilva/git-hooks-php
```

pre-commit
----------

[](#pre-commit)

Currently my pre-commit hook is checking for `PSR2` coding standards that are not met using [php\_codesniffer tool](https://github.com/squizlabs/php_codesniffer).

How to contribute
-----------------

[](#how-to-contribute)

- Create a Pull Request
- Suggest new ideas or open new detected issues

Created by
----------

[](#created-by)

- [Bernardo Silva](https://www.bernardosilva.com)

License
-------

[](#license)

MIT © [Bernardo Silva](https://www.bernardosilva.com)

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity32

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity73

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 ~65 days

Recently: every ~36 days

Total

15

Last Release

2947d ago

Major Versions

0.1.0 → 1.0.02016-05-10

1.0.0 → 2.0.02017-11-30

1.1.0 → 2.1.02017-12-01

1.x-dev → 2.1.12017-12-13

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1537510?v=4)[Bernardo Vieira da Silva](/maintainers/BernardoSilva)[@BernardoSilva](https://github.com/BernardoSilva)

---

Top Contributors

[![BernardoSilva](https://avatars.githubusercontent.com/u/1537510?v=4)](https://github.com/BernardoSilva "BernardoSilva (38 commits)")

---

Tags

githookspre-commitphp-cs-fixercheckstyle

### Embed Badge

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

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

###  Alternatives

[captainhook/captainhook

PHP git hook manager

1.1k6.8M370](/packages/captainhook-captainhook)[bruli/php-git-hooks

Git hooks for PHP projects.

675370.8k5](/packages/bruli-php-git-hooks)[wcm/git-php-hooks

Write git hooks with PHP, organize them on a per-project base and automatically add them

6441.1k3](/packages/wcm-git-php-hooks)[felipebool/crook

Crook is a simple tool to ease your life when dealing with git hooks

5813.8k](/packages/felipebool-crook)[igorsgm/laravel-git-hooks

🪝• Efficiently manage Git hooks in Laravel projects. Enhance code quality, save time on reviews, and prevent bugs from entering your repository.

2931.7k1](/packages/igorsgm-laravel-git-hooks)[wcm/git-php-hooks-library

A collection of Git PHP Hooks

1210.1k3](/packages/wcm-git-php-hooks-library)

PHPackages © 2026

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