PHPackages                             iodigital-com/composer-git-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. [Utility &amp; Helpers](/categories/utility)
4. /
5. iodigital-com/composer-git-hooks

ActiveComposer-plugin[Utility &amp; Helpers](/categories/utility)

iodigital-com/composer-git-hooks
================================

iO Composer Git Hooks

v3.2.0(1y ago)237.4k↑19.9%2[1 PRs](https://github.com/iodigital-com/composer-git-hooks/pulls)MITPHPPHP ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0CI passing

Since Jun 5Pushed 1y ago7 watchersCompare

[ Source](https://github.com/iodigital-com/composer-git-hooks)[ Packagist](https://packagist.org/packages/iodigital-com/composer-git-hooks)[ RSS](/packages/iodigital-com-composer-git-hooks/feed)WikiDiscussions develop Synced 1mo ago

READMEChangelogDependencies (7)Versions (31)Used By (0)

iO Composer Git Hooks
=====================

[](#io-composer-git-hooks)

Composer plugin to manage git hooks from `bin/git-hooks/[hook].d` folders.

How it works:

1. Include the package as a dev dependency
2. On execution of Composer's `install` and `update` commands, symlinks will be created from `.git/hooks/[hook]` to this module's `scripts/chain-hook` script for all non-remote [git hooks](https://git-scm.com/docs/githooks#_hooks).
3. The `chain-hook` script will run the scripts found in the project's `bin/git-hooks/[hook].d` folder.

Prerequisites
-------------

[](#prerequisites)

- A composer-managed project

Install
-------

[](#install)

Add the package as a dev dependency.

```
composer require --dev iodigital-com/composer-git-hooks
```

Add the package to the [allow-plugins section](https://getcomposer.org/doc/06-config.md#allow-plugins) of your `composer.json` file:

```
{
    "config": {
        "allow-plugins": {
            ...
            "iodigital-com/composer-git-hooks": true
            ...
        }
    }
}
```

### Running the script manually

[](#running-the-script-manually)

This package is a composer plugin and will install the githooks automatically on `composer install` and `composer update`. Should you need it however, you can run the installer manually by adding it as a composer script and executing it.

Add the following to `composer.json`:

```
"scripts": {
    ...
    "install-git-hooks": "IODigital\\ComposerGitHooks\\ComposerPlugin::process"
    ...
},
```

Run it:

```
composer run-script install-git-hooks
```

Usage
-----

[](#usage)

Add project specific git-hooks to `bin/git-hooks/[hook].d`. For example:

- `bin/git-hooks/pre-commit.d/phpstan`
- `bin/git-hooks/pre-commit.d/phpcs`

All scripts (for in this case `pre-commit`) should give a 0 exit code for the whole hook to succeed.

Contribute
----------

[](#contribute)

Create a pull request. This package makes use of the `composer` plugin interface. See the [composer documentation](https://getcomposer.org/doc/articles/plugins.md).

###  Health Score

49

—

FairBetter than 95% of packages

Maintenance46

Moderate activity, may be stable

Popularity33

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity83

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 75% 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 ~76 days

Recently: every ~192 days

Total

24

Last Release

412d ago

Major Versions

0.2.1 → 1.0.02020-10-30

v1.3.0 → v2.0.02022-05-23

v2.2.0 → v3.0.02023-11-23

PHP version history (9 changes)0.0.1PHP ~7.2.0 || ~7.3.0

0.1.4PHP ~7.2.0 || ~7.3.0 || ~7.4.0

1.0.1PHP ~7.3.0 || ~7.4.0

v1.2.0PHP ~7.3.0 || ~7.4.0 || ~8.0.0

v1.3.0PHP ~7.4.0 || ~8.0.0

v2.0.0PHP ~7.4.0 || ~8.0.0 || ~8.1.0

v2.2.0PHP ~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0

v3.1.0PHP ~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0

v3.2.0PHP ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/80809e7caf8341b1bac3d759e2b159a38b9bdab2deee5b0d4d66de6c83b992d1?d=identicon)[IntractoSupport](/maintainers/IntractoSupport)

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

![](https://www.gravatar.com/avatar/6f1ed5a230a1b7a889ad5bb727fc43f070e2d57ad9f857625226096cbfcc80c7?d=identicon)[aadmathijssen](/maintainers/aadmathijssen)

![](https://www.gravatar.com/avatar/5270be3fd791a1045f0d928c0ca5d801d2c9dac77b83338a8ac877b94c6f7934?d=identicon)[mischabraam](/maintainers/mischabraam)

---

Top Contributors

[![francoisvdv](https://avatars.githubusercontent.com/u/290790?v=4)](https://github.com/francoisvdv "francoisvdv (102 commits)")[![aadmathijssen](https://avatars.githubusercontent.com/u/3796971?v=4)](https://github.com/aadmathijssen "aadmathijssen (26 commits)")[![muuk-iO](https://avatars.githubusercontent.com/u/97738632?v=4)](https://github.com/muuk-iO "muuk-iO (7 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")

###  Code Quality

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/iodigital-com-composer-git-hooks/health.svg)

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

###  Alternatives

[vaimo/composer-patches

Applies a patch from a local or remote file to any package that is part of a given composer project. Patches can be defined both on project and on package level. Optional support for patch versioning, sequencing, custom patch applier configuration and patch command for testing/troubleshooting added patches.

2994.3M16](/packages/vaimo-composer-patches)[mglaman/composer-drupal-lenient

1317.4M15](/packages/mglaman-composer-drupal-lenient)[drupal/core-composer-scaffold

A flexible Composer project scaffold builder.

5341.9M446](/packages/drupal-core-composer-scaffold)[drupal/core-project-message

Adds a message after Composer installation.

2122.6M172](/packages/drupal-core-project-message)[olvlvl/composer-attribute-collector

A convenient and near zero-cost way to retrieve targets of PHP 8 attributes

184108.8k8](/packages/olvlvl-composer-attribute-collector)[lullabot/drainpipe

An automated build tool to allow projects to have a set standardized operations scripts.

41716.4k2](/packages/lullabot-drainpipe)

PHPackages © 2026

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