PHPackages                             php-composter/php-composter-regular-expression - 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. php-composter/php-composter-regular-expression

ActivePhp-composter-action

php-composter/php-composter-regular-expression
==============================================

PHP Composter regular expression checks.

v0.1.1(8y ago)16MITPHP

Since Oct 18Pushed 8y ago2 watchersCompare

[ Source](https://github.com/php-composter/php-composter-regular-expression)[ Packagist](https://packagist.org/packages/php-composter/php-composter-regular-expression)[ RSS](/packages/php-composter-php-composter-regular-expression/feed)WikiDiscussions master Synced 6d ago

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

PHP Composter Regular Expressions
=================================

[](#php-composter-regular-expressions)

### PHP Composter regular expression checks.

[](#php-composter-regular-expression-checks)

[![Latest Stable Version](https://camo.githubusercontent.com/c4cc6ad7adcbb663055f92e89be165a0552b5788d57639e2e21943f07351b4c0/68747470733a2f2f706f7365722e707567782e6f72672f7068702d636f6d706f737465722f7068702d636f6d706f737465722d726567756c61722d65787072657373696f6e2f762f737461626c65)](https://packagist.org/packages/php-composter/php-composter-regular-expression)[![Total Downloads](https://camo.githubusercontent.com/c1ecd21a7a641e51f390bcb0be14ab1ff76a53d8aba2be49ce7a4f73a93afc6d/68747470733a2f2f706f7365722e707567782e6f72672f7068702d636f6d706f737465722f7068702d636f6d706f737465722d726567756c61722d65787072657373696f6e2f646f776e6c6f616473)](https://packagist.org/packages/php-composter/php-composter-regular-expression)[![Latest Unstable Version](https://camo.githubusercontent.com/82b779e55927be4668b3c0c4a34b7befe42dcd11a0ffb112633965ea60c66b12/68747470733a2f2f706f7365722e707567782e6f72672f7068702d636f6d706f737465722f7068702d636f6d706f737465722d726567756c61722d65787072657373696f6e2f762f756e737461626c65)](https://packagist.org/packages/php-composter/php-composter-regular-expression)[![License](https://camo.githubusercontent.com/438978bbae643b358a200fe5b740fd9bf3070e65a8e565260932c9742401170f/68747470733a2f2f706f7365722e707567782e6f72672f7068702d636f6d706f737465722f7068702d636f6d706f737465722d726567756c61722d65787072657373696f6e2f6c6963656e7365)](https://packagist.org/packages/php-composter/php-composter-regular-expression)

This Composer package will check your commit messages to make sure they match a set of regular expression rules.

This is a [PHP Composter](https://github.com/php-composter/php-composter) Action.

Table Of Contents
-----------------

[](#table-of-contents)

- [Installation](#installation)
- [Basic Usage](#basic-usage)
- [Contributing](#contributing)

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

[](#installation)

First, you need to add the package as a development requirement to your `composer.json`:

```
composer require --dev php-composter/php-composter-regular-expression
```

Then, you need to add the regular expressions you want to check for. As an example, the following expression will ensure that commit message subject lines start with one of the following words: `feature`, `bug`, `documentation`, `style`:

```
"extra": {
  "php-composter-regular-expression": {
    "commit-message": {
      "subject": {
        "has": "^(feature|bug|documentation|style):"
      }
    }
  }
}
```

Basic Usage
-----------

[](#basic-usage)

It should just work when you `git commit`.

Composer Extra Reference
------------------------

[](#composer-extra-reference)

The Composer extra entry takes the following format:

```
"extra": {
  "php-composter-regular-expression": {
    "": {
      "": {
        "": ""
      }
    }
  }
}
```

Each hook can contain multiple content elements to check, and each content element can contain multiple rules.

The regular expression will be wrapped in special delimiter chars (`chr(1)`), so you don't need to include these.

### Supported hooks

[](#supported-hooks)

**`commit-message`:**

Check the commit message after it has been submitted.

### Supported content elements

[](#supported-content-elements)

#### For the `commit-message` hook

[](#for-the-commit-message-hook)

**`subject`:**

Subject line of the commit message, meaning the very first line of the commit message up until the first EOL character.

**`body`:**

Body of the commit message, meaning everything after the first EOL character.

### Supported rules

[](#supported-rules)

**`has`:**

Passes the check if the regular expression results in one or more matches.

**`has-not`:**

Passes the check if the regular expression results in no matches.

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

[](#contributing)

All feedback / bug reports / pull requests are welcome.

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity54

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

Every ~0 days

Total

2

Last Release

3133d ago

### Community

Maintainers

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

---

Top Contributors

[![schlessera](https://avatars.githubusercontent.com/u/83631?v=4)](https://github.com/schlessera "schlessera (7 commits)")

---

Tags

hacktoberfest

### Embed Badge

![Health badge](/badges/php-composter-php-composter-regular-expression/health.svg)

```
[![Health](https://phpackages.com/badges/php-composter-php-composter-regular-expression/health.svg)](https://phpackages.com/packages/php-composter-php-composter-regular-expression)
```

PHPackages © 2026

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