PHPackages                             jv-testes/pre-commit - 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. jv-testes/pre-commit

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

jv-testes/pre-commit
====================

Pre-commit hook

1.2.6(10y ago)0461MITPHP

Since Aug 8Pushed 10y agoCompare

[ Source](https://github.com/JVTestes/pre-commit)[ Packagist](https://packagist.org/packages/jv-testes/pre-commit)[ Docs](https://github.com/juizmill/pre-commit)[ RSS](/packages/jv-testes-pre-commit/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (8)Dependencies (5)Versions (14)Used By (1)

Pre commit hook
===============

[](#pre-commit-hook)

Checks in our pre-commit hook

- 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 `jv-testes/pre-commit` as a composer dependency.

composer.json

```
"require-dev": {
    ...
    "jv-testes/pre-commit": ">=1.2.3"
}
```

**USAGE:**

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

Edit composer.json and add:

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

```

Remembering to set up the hooks

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

[](#custom-config)

Copy arquives `vendor/jv-testes/pre-commit/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

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity70

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

Total

13

Last Release

3918d ago

### 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 (30 commits)")

### Embed Badge

![Health badge](/badges/jv-testes-pre-commit/health.svg)

```
[![Health](https://phpackages.com/badges/jv-testes-pre-commit/health.svg)](https://phpackages.com/packages/jv-testes-pre-commit)
```

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