PHPackages                             metasyntactical/composer-codesniffer-hooks - 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. [Testing &amp; Quality](/categories/testing)
4. /
5. metasyntactical/composer-codesniffer-hooks

Abandoned → [captainhook/captainhook](/?search=captainhook%2Fcaptainhook)ArchivedLibrary[Testing &amp; Quality](/categories/testing)

metasyntactical/composer-codesniffer-hooks
==========================================

PHP CodeSniffer script hooks for composer

v1.0.1(10y ago)1641MITPHPPHP &gt;= 5.5.0

Since Mar 25Pushed 7y ago2 watchersCompare

[ Source](https://github.com/MetaSyntactical/composer-codesniffer-hooks)[ Packagist](https://packagist.org/packages/metasyntactical/composer-codesniffer-hooks)[ RSS](/packages/metasyntactical-composer-codesniffer-hooks/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (3)Versions (4)Used By (1)

Composer CodeSniffer Hooks
==========================

[](#composer-codesniffer-hooks)

[![Build Status](https://camo.githubusercontent.com/832632fba3e5c6d6bfee6a6825ab14078e3f7e7dfcbc0f7ac63564f0d4cf5473/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f4d65746153796e746163746963616c2f636f6d706f7365722d636f6465736e69666665722d686f6f6b732e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/MetaSyntactical/composer-codesniffer-hooks)[![Downloads this Month](https://camo.githubusercontent.com/13618f08ac899c39b10d40c2b45ff1e3893c41d64e3cad6bf3a4be1062896326/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f6d65746173796e746163746963616c2f636f6d706f7365722d636f6465736e69666665722d686f6f6b732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/metasyntactical/composer-codesniffer-hooks)[![Latest stable](https://camo.githubusercontent.com/0f7f2feea4653642590c875915a923366b372c4ab3d9df1eec9729336f513d0b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d65746173796e746163746963616c2f636f6d706f7365722d636f6465736e69666665722d686f6f6b732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/metasyntactical/composer-codesniffer-hooks)

Hooks to enable PHP CodeSniffer with the Coding Standard configurable after running `composer install` or `composer update`.

The project is abandoned!
-------------------------

[](#the-project-is-abandoned)

**This project is abandoned in favor of [captainhook/captainhook](https://packagist.org/packages/captainhook/captainhook) providing general git hooks management. Everything in this repository can be achieved with captainhook/captainhook.**

Install
-------

[](#install)

Install dependency via composer:

```
$ composer require --dev metasyntactical/composer-codesniffer-hooks
```

Add scripts to composer post hooks:

```
"scripts": {
    "post-install-cmd": [
        "MetaSyntactical\\CodeSniffer\\Composer\\ScriptHandler::addPhpCsToPreCommitHook"
    ],
    "post-update-cmd": [
        "MetaSyntactical\\CodeSniffer\\Composer\\ScriptHandler::addPhpCsToPreCommitHook"
    ]
}
```

Add the codesniffer standard which has been installed as dependency (e.g. "metasyntactical/symfony-coding-standard") to the extra field in composer.json:

```
"extras": {
    "codesniffer": {
        "standard": {
            "dependency": "metasyntactical/symfony-coding-standard"
        }
    }
}
```

On each `composer install` or `composer update` the hook will be deployed to the local git repository.

Usage
-----

[](#usage)

Every time you try to commit, PHP\_CodeSniffer will run on changed `.php` files only. There is nothing to do manually.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity60

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

Total

3

Last Release

3951d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/461576?v=4)[Daniel Kreuer](/maintainers/dkreuer)[@dkreuer](https://github.com/dkreuer)

---

Top Contributors

[![dkreuer](https://avatars.githubusercontent.com/u/461576?v=4)](https://github.com/dkreuer "dkreuer (13 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/metasyntactical-composer-codesniffer-hooks/health.svg)

```
[![Health](https://phpackages.com/badges/metasyntactical-composer-codesniffer-hooks/health.svg)](https://phpackages.com/packages/metasyntactical-composer-codesniffer-hooks)
```

###  Alternatives

[slevomat/coding-standard

Slevomat Coding Standard for PHP\_CodeSniffer complements Consistence Coding Standard by providing sniffs with additional checks.

1.5k123.5M1.8k](/packages/slevomat-coding-standard)[magento/magento-coding-standard

A set of Magento specific PHP CodeSniffer rules.

37113.4M299](/packages/magento-magento-coding-standard)[youwe/testing-suite

Contains Youwe's default testing packages for php.

13176.9k8](/packages/youwe-testing-suite)

PHPackages © 2026

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