PHPackages                             drx777/phpgh - 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. drx777/phpgh

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

drx777/phpgh
============

git hooks for PHP

0.1.1(10y ago)023MITShell

Since Aug 4Pushed 10y ago1 watchersCompare

[ Source](https://github.com/drx777/phpgh)[ Packagist](https://packagist.org/packages/drx777/phpgh)[ RSS](/packages/drx777-phpgh/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (2)Versions (3)Used By (0)

[![Latest Stable Version](https://camo.githubusercontent.com/8639f0927473e1c59086224c56307405bc199473df4c7a82a4c77a1b61c8293c/68747470733a2f2f706f7365722e707567782e6f72672f6472783737372f70687067682f762f737461626c65)](https://packagist.org/packages/drx777/phpgh) [![Total Downloads](https://camo.githubusercontent.com/e6c8ac8117a1b828fb4e7a874227861ff2d007fbe2f2c041d58c5e7c08c8960d/68747470733a2f2f706f7365722e707567782e6f72672f6472783737372f70687067682f646f776e6c6f616473)](https://packagist.org/packages/drx777/phpgh) [![Latest Unstable Version](https://camo.githubusercontent.com/ef46b94ae39bbdc8a3cd3d4a2399c011e31df3b657b38edc072ba6549d52cb6b/68747470733a2f2f706f7365722e707567782e6f72672f6472783737372f70687067682f762f756e737461626c65)](https://packagist.org/packages/drx777/phpgh) [![License](https://camo.githubusercontent.com/b0598999d2c49552abb293e5044ffc2ca1a15bb59cb1e300b90a26ba793b10d6/68747470733a2f2f706f7365722e707567782e6f72672f6472783737372f70687067682f6c6963656e7365)](https://packagist.org/packages/drx777/phpgh)

phpgh
=====

[](#phpgh)

git hooks for PHP

Purpose
-------

[](#purpose)

This package wants to provide a simple way of adding git hooks to a project, even a number of projects without having to mess with multiple project's .git/hooks/\* scripts repeatedly. Install via composer and add a line to the hook script. Done.

It can be used to kickstart your own centralized git hooks or as a basis for a company policy git hook collection.

Status
------

[](#status)

This is an early proof-of-concept version. Any constructive feedback and suggestions are welcome.

Install
-------

[](#install)

### globally (recommended)

[](#globally-recommended)

no need to modify the project's composer.json and disturbing your collegues

`$ composer require global drx777/phpgh`

add a call to the hooks script to your git project's .git/hooks/pre-commit (make sure the script is executable):

`~/.composer/vendor/bin/phpgh phplint phpcs phpunit`

### per project

[](#per-project)

`$ composer require --dev drx777/phpgh`

add a call to the hooks script to your git project's .git/hooks/pre-commit (make sure the script is executable):

`./vendor/bin/phpgh phpcs phplint phpunit`

### available hooks

[](#available-hooks)

- phpcs
- phplint
- phpunit

References
----------

[](#references)

Using portions from

License
-------

[](#license)

The MIT License (MIT)

Copyright (c) 2015 David Rekowski

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

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

Total

2

Last Release

3941d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/34fad7b5a21f198da9151b7f5a5b0e13c2c7c50ae5c57f64e485bcb587009216?d=identicon)[drx777](/maintainers/drx777)

---

Top Contributors

[![drx777](https://avatars.githubusercontent.com/u/199812?v=4)](https://github.com/drx777 "drx777 (17 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/drx777-phpgh/health.svg)

```
[![Health](https://phpackages.com/badges/drx777-phpgh/health.svg)](https://phpackages.com/packages/drx777-phpgh)
```

PHPackages © 2026

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