PHPackages                             damien-list/phpcs-git-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. [Debugging &amp; Profiling](/categories/debugging)
4. /
5. damien-list/phpcs-git-pre-commit

ActiveScripts[Debugging &amp; Profiling](/categories/debugging)

damien-list/phpcs-git-pre-commit
================================

PHP-CS-Fixer check before commit based on Sergey Gladkovskiy's work

0.1(6y ago)01.1kMITShell

Since Nov 25Pushed 6y agoCompare

[ Source](https://github.com/damien-list/phpcs-git-pre-commit)[ Packagist](https://packagist.org/packages/damien-list/phpcs-git-pre-commit)[ RSS](/packages/damien-list-phpcs-git-pre-commit/feed)WikiDiscussions master Synced 6d ago

READMEChangelogDependencies (1)Versions (2)Used By (0)

PHPCS git pre-commit hook
=========================

[](#phpcs-git-pre-commit-hook)

About
-----

[](#about)

Auto installed git pre-commit hook for running [PHP Code Sniffer](https://github.com/squizlabs/PHP_CodeSniffer)code checking to PSR2 coding standard compliance. It checks only files that are to be committed.

Inspired by [Enforce code standards with composer, git hooks, and phpcs](http://tech.zumba.com/2014/04/14/control-code-quality/)

Installation
------------

[](#installation)

Install `damien-list/phpcs-git-pre-commit` with composer require command:

```
composer require "damien-list/phpcs-git-pre-commit"

```

Or alternatively, include a dependency for `damien-list/phpcs-git-pre-commit` in your composer.json file manually:

```
{
    "require-dev": {
        "damien-list/phpcs-git-pre-commit": "dev-master"
    }
}

```

To enable code sniff, аdd to `post-install-cmd` and `post-update-cmd` in `composer.json` installation script:

```
"post-install-cmd": [
    "sh ./vendor/damien-list/phpcs-git-pre-commit/src/setup.sh"
],
"post-update-cmd": [
    "sh ./vendor/damien-list/phpcs-git-pre-commit/src/setup.sh"
]

```

Then run `composer install` or `composer update`. `pre-commit` hook will be installed or updated if it already exists.

Usage
-----

[](#usage)

Run `git commit` and pre-commit hook will check your committed files like if you run

```
php-cs-fixer fix /path/to/file.php --dry-run

```

Contributing
------------

[](#contributing)

Feel free to make pull requests!

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 56.5% 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

Unknown

Total

1

Last Release

2365d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/e48253fa8cfe370a3e98b94268de76e8c8ac687a2e2b39feef881a940aeb66ac?d=identicon)[damien-list](/maintainers/damien-list)

---

Top Contributors

[![damien-list](https://avatars.githubusercontent.com/u/1785580?v=4)](https://github.com/damien-list "damien-list (13 commits)")[![smgladkovskiy](https://avatars.githubusercontent.com/u/128070?v=4)](https://github.com/smgladkovskiy "smgladkovskiy (10 commits)")

### Embed Badge

![Health badge](/badges/damien-list-phpcs-git-pre-commit/health.svg)

```
[![Health](https://phpackages.com/badges/damien-list-phpcs-git-pre-commit/health.svg)](https://phpackages.com/packages/damien-list-phpcs-git-pre-commit)
```

###  Alternatives

[symfony/stopwatch

Provides a way to profile code

2.8k387.2M918](/packages/symfony-stopwatch)[fruitcake/laravel-debugbar

PHP Debugbar integration for Laravel

19.1k662.9k29](/packages/fruitcake-laravel-debugbar)[spatie/ignition

A beautiful error page for PHP applications.

510147.6M69](/packages/spatie-ignition)[koriym/printo

An object graph visualizer.

1421.8M2](/packages/koriym-printo)[soloterm/dumps

A Laravel command to intercept dumps from your Laravel application.

125285.7k3](/packages/soloterm-dumps)[beyondcode/helo-laravel

HELO Laravel debug helper

90360.1k](/packages/beyondcode-helo-laravel)

PHPackages © 2026

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