PHPackages                             phpple/gitwatcher - 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. phpple/gitwatcher

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

phpple/gitwatcher
=================

A Smart Git Hook Assembly.

v0.4.8(5y ago)1440MITPHPCI failing

Since Feb 27Pushed 5y ago1 watchersCompare

[ Source](https://github.com/phpple/gitwatcher)[ Packagist](https://packagist.org/packages/phpple/gitwatcher)[ RSS](/packages/phpple-gitwatcher/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (1)Dependencies (3)Versions (8)Used By (0)

GitWatcher
----------

[](#gitwatcher)

GitWatcher is a assembly of git hook script.

If you want to use it, just add some script in your composer.json file.

```
composer require phpple/gitwatcher --dev
```

```
"scripts": {
    "post-autoload-dump": [
      "Phpple\\GitWatcher\\Composer::postAutoloadDump"
    ]
}

```

Watchers
--------

[](#watchers)

Your can find the watchers in `src/Watcher`

### git\_version

[](#git_version)

Check whether the git's version greater than the custom version. The default mininum version is 2.2.0.

### committer

[](#committer)

Check the validity of committer's information.For example, the committer's email's extension.

#### example

[](#example)

```
{
  "committer": {
    "email_extension": "live.com"
  }
}
```

Inspect will be failed when your local git config about user.email is not end with live.com.

### composer

[](#composer)

Check the validity of `composer.json`.

#### example

[](#example-1)

```
{
  "composer": {}
}
```

Inspect will be failed when any repository's version of `require` field's is not a constant.

#### Illegal composer.json

[](#illegal-composerjson)

```
{
  "require": {
    "fideloper/proxy": "^4.3"
  }
}
```

#### Good composer.json

[](#good-composerjson)

```
{
  "require": {
    "fideloper/proxy": "4.3.0"
  }
}
```

### StandardWatcher

[](#standardwatcher)

Check the validity of your code by phpcs.

#### example

[](#example-2)

```
{
  "standard": {
    "phpcs": "vendor/bin/phpcs",
    "target": "app/,src/",
    "mode": "all",
    "options": {
      "standard": "{$project.root}assets/rules/phpdefault.xml",
      "colors": true,
      "s": true
    }
  }
}
```

- `phpcs`: where the phpcs bin file is
- `target`: the dir will be checked by phpcs
- `mode`: \[all|update\]
    - `all`:check all the files in `target`
    - `update`:only check update files in `target`
- `options`: the options of phpcs
    - `standard`: `{$project.root}` refer to the root dir of gitwatcher.
    - `colors`: print texts with color
    - `s`: print the sniffer of the problem
    - ... see the help of phpcs

Custom configure
----------------

[](#custom-configure)

If your want to custom the configure, you can add a file(`gitwatcher.json`) in your site root dir. such as

```
{
  "@extend": "default",
  "standard": {
    "options": {
      "colors": false
    }
  }
}
```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity51

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

Recently: every ~92 days

Total

7

Last Release

1875d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9a34df4dd25b4a8efe5c4a59f25f84737df592207c5d177ece3f7a3f5f0a01de?d=identicon)[comdeng](/maintainers/comdeng)

---

Top Contributors

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

---

Tags

githook

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/phpple-gitwatcher/health.svg)

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

###  Alternatives

[shopsys/coding-standards

Coding standards definition compatible with PSR-2

20269.1k13](/packages/shopsys-coding-standards)[flyeralarm/php-code-validator

A custom coding standard for FLYERALARM

2226.9k6](/packages/flyeralarm-php-code-validator)

PHPackages © 2026

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