PHPackages                             captainhook/plugin-composer - 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. captainhook/plugin-composer

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

captainhook/plugin-composer
===========================

Composer-Plugin handling your git-hooks

5.3.3(4y ago)201.9M—5.4%4[2 issues](https://github.com/captainhookphp/plugin-composer/issues)20MITPHPPHP &gt;=7.1

Since Nov 26Pushed 2y ago2 watchersCompare

[ Source](https://github.com/captainhookphp/plugin-composer)[ Packagist](https://packagist.org/packages/captainhook/plugin-composer)[ RSS](/packages/captainhook-plugin-composer/feed)WikiDiscussions fluffy\_hedgehog Synced 1mo ago

READMEChangelog (10)Dependencies (3)Versions (21)Used By (20)

Composer-Plugin for [CaptainHook](https://github.com/captainhookphp/captainhook)
================================================================================

[](#composer-plugin-for-captainhook)

⚠️ This package is deprecated ⚠️
--------------------------------

[](#️-this-package-is-deprecated-️)

Please use the [hook-installer](https://github.com/captainhookphp/hook-installer) package instead. The only difference to this package is that it does NOT require `CaptainHook` by itself. That gives you the opportunity to choose your installation method. You can either install the PHAR or the source code version with all its dependencies.

```
{
  "require-dev": {
    "captainhook/captainhook-phar": "^5.0",
    "captainhook/hook-installer": "^1.0"
  }
}
```

or

```
{
  "require-dev": {
    "captainhook/captainhook": "^5.0",
    "captainhook/hook-installer": "^1.0"
  }
}
```

or even use PHIVE to install the captain and just install the `hook-installer` plugin with composer.

```
{
  "require-dev": {
    "captainhook/hook-installer": "^1.0"
  },
  "extra": {
    "captainhook": {
      "exec": "tools/captainhook.phar"
    }
  }
}
```

[![Latest Stable Version](https://camo.githubusercontent.com/db9d04d542f9042e6de2637fa8efc9d298b228698846a840093620e7054c198b/68747470733a2f2f706f7365722e707567782e6f72672f6361707461696e686f6f6b2f706c7567696e2d636f6d706f7365722f762f737461626c652e7376673f763d31)](https://packagist.org/packages/captainhook/plugin-composer)[![Minimum PHP Version](https://camo.githubusercontent.com/824c5c4ccb56537db3b3b53bb43d7b8edc6286f3b3d1705525e0821dfd22d27e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344253230372e312d3838393242462e737667)](https://php.net/)[![Downloads](https://camo.githubusercontent.com/3ff277dc2428880955babd0bf7d3b4cd74a7225e5c5dc7010a6cf70c616ed48e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6361707461696e686f6f6b2f706c7567696e2d636f6d706f7365722e7376673f7631)](https://packagist.org/packages/captainhook/plugin-composer)[![License](https://camo.githubusercontent.com/3e0c6fe67803ba86a71b1c2d19a2710f5638bffaaec404b552367db030caba7f/68747470733a2f2f706f7365722e707567782e6f72672f6361707461696e686f6f6b2f706c7567696e2d636f6d706f7365722f6c6963656e73652e7376673f763d31)](https://packagist.org/packages/captainhook/plugin-composer)

This is a composer-plugin that makes sure your teammates install the git hooks. For more information visit its [Website](https://github.com/captainhookphp/captainhook).

Installation:
-------------

[](#installation)

As this is a composer-plugin the preferred method is to use composer for installation.

```
$ composer require --dev captainhook/plugin-composer
```

Everything else will happen automagically.

Customize
---------

[](#customize)

You can set a custom name for your hook configuration. If you want to use the PHAR release of `CaptainHook` you can configure the path to the PHAR file. All extra config settings are optional and if you are using the default settings you do not have to configure anything to make it work.

```
{
  "extra": {
    "captainhook": {
      "config": "hooks.json",
      "exec": "tools/captainhook.phar",
      "disable-plugin": false
    }
  }
}
```

A word of warning
-----------------

[](#a-word-of-warning)

It is still possible to commit without invoking the hooks. So make sure you run appropriate backend-sanity checks on your code!

###  Health Score

44

—

FairBetter than 92% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity50

Moderate usage in the ecosystem

Community35

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 72.7% 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 ~72 days

Recently: every ~82 days

Total

17

Last Release

1571d ago

Major Versions

1.0.0 → 3.0.02018-11-26

3.0.0 → 4.0.02019-01-10

4.0.0 → 5.0.02020-01-01

PHP version history (2 changes)1.0.0PHP ^7.1

5.2.3PHP &gt;=7.1

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/9250358?v=4)[Sebastian Feldmann](/maintainers/sebastianfeldmann)[@sebastianfeldmann](https://github.com/sebastianfeldmann)

---

Top Contributors

[![sebastianfeldmann](https://avatars.githubusercontent.com/u/9250358?v=4)](https://github.com/sebastianfeldmann "sebastianfeldmann (40 commits)")[![be-heiglandreas](https://avatars.githubusercontent.com/u/60882198?v=4)](https://github.com/be-heiglandreas "be-heiglandreas (8 commits)")[![heiglandreas](https://avatars.githubusercontent.com/u/91998?v=4)](https://github.com/heiglandreas "heiglandreas (3 commits)")[![aboks](https://avatars.githubusercontent.com/u/815524?v=4)](https://github.com/aboks "aboks (1 commits)")[![f1r3ph03n1xX](https://avatars.githubusercontent.com/u/11872423?v=4)](https://github.com/f1r3ph03n1xX "f1r3ph03n1xX (1 commits)")[![shochdoerfer](https://avatars.githubusercontent.com/u/596449?v=4)](https://github.com/shochdoerfer "shochdoerfer (1 commits)")[![torhoehn](https://avatars.githubusercontent.com/u/1945725?v=4)](https://github.com/torhoehn "torhoehn (1 commits)")

---

Tags

hacktoberfest

### Embed Badge

![Health badge](/badges/captainhook-plugin-composer/health.svg)

```
[![Health](https://phpackages.com/badges/captainhook-plugin-composer/health.svg)](https://phpackages.com/packages/captainhook-plugin-composer)
```

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