PHPackages                             maxorlovsky/commit-msg-php - 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. maxorlovsky/commit-msg-php

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

maxorlovsky/commit-msg-php
==========================

commit-msg-php is a commit-msg hook installer for git with configuration available in composer.json

0.1.0(7y ago)29761MITPHPPHP ~5.6|~7.0

Since Sep 28Pushed 7y ago1 watchersCompare

[ Source](https://github.com/maxorlovsky/commit-msg-php)[ Packagist](https://packagist.org/packages/maxorlovsky/commit-msg-php)[ Docs](https://github.com/maxorlovsky/commit-msg-php)[ RSS](/packages/maxorlovsky-commit-msg-php/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

commit-msg
==========

[](#commit-msg)

**commit-msg** is a commit-msg hook installer for `git` with configuration available in `composer.json`

This is a fork of my other package created for [javascript](https://github.com/maxorlovsky/git-commit-msg). Why this package is better than other provided in packagist, this one is installed automatically as you add it to your dependencies list. You don't need to ask your developers to run some installation commands separately for every project you have.

The idea of this library is to force using semantic-release rules in commit-message using [Angular Commit Message Conventions](https://github.com/angular/angular.js/blob/master/DEVELOPERS.md#-git-commit-guidelines)

### Installation (Composer)

[](#installation-composer)

Run

```
composer require commit-msg --dev

```

This will replace commit-msg in your .git/hooks folder with code, that will run checks on every git commit.

### Configuration

[](#configuration)

Configuration is simple and is done in `composer.json`, you just need to add commit-msg object to "config" parameter:

```
"config": {
    "commit-msg": {
        "types": [
            "feat",
            "fix",
            "chore",
            "docs",
            "refactor",
            "style",
            "perf",
            "test",
            "revert"
        ],
        "lineLength": 72,
        "scope": {
            "mandatory": true,
            "rules": "Task-(\\d+)"
        }
    }
}
```

commit-msg-&gt;types (array of strings) will add rules, so your git commit messages must start using those types like

```
feat:

```

or

```
feat(scope/filename):

```

commit-msg-&gt;lineLength (integer) will make sure that lines in your commit message are always less or equal to the number you set into this config

commit-msg-&gt;scope (array) will make sure that scope is always following rules specified as Regular Expression

This package is WIP, so propose your ideas - open issue or create pull request.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 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

Unknown

Total

1

Last Release

2789d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2caf9607dc04aca60bccedd5122c3372e497106ccad73056029874ca3062fd2c?d=identicon)[MaxOrlovsky](/maintainers/MaxOrlovsky)

---

Top Contributors

[![maxorlovsky](https://avatars.githubusercontent.com/u/7931620?v=4)](https://github.com/maxorlovsky "maxorlovsky (10 commits)")

---

Tags

githookscommit messagecommit-msggit commit msg

### Embed Badge

![Health badge](/badges/maxorlovsky-commit-msg-php/health.svg)

```
[![Health](https://phpackages.com/badges/maxorlovsky-commit-msg-php/health.svg)](https://phpackages.com/packages/maxorlovsky-commit-msg-php)
```

###  Alternatives

[captainhook/captainhook

PHP git hook manager

1.1k6.8M370](/packages/captainhook-captainhook)[ramsey/conventional-commits

A PHP library for creating and validating commit messages according to the Conventional Commits specification. Includes a CaptainHook action!

1931.2M122](/packages/ramsey-conventional-commits)[wcm/git-php-hooks

Write git hooks with PHP, organize them on a per-project base and automatically add them

6441.1k3](/packages/wcm-git-php-hooks)[felipebool/crook

Crook is a simple tool to ease your life when dealing with git hooks

5813.8k](/packages/felipebool-crook)[bernardosilva/git-hooks-php

Composer git-hook package with hooks for your php projects.

2516.7k1](/packages/bernardosilva-git-hooks-php)[wcm/git-php-hooks-library

A collection of Git PHP Hooks

1210.1k3](/packages/wcm-git-php-hooks-library)

PHPackages © 2026

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