PHPackages                             phputil/kahlan - 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. phputil/kahlan

ActiveLibrary[Testing &amp; Quality](/categories/testing)

phputil/kahlan
==============

Additional matchers for Kahlan

v0.3.0(2y ago)1541MITPHP

Since Sep 30Pushed 2y ago1 watchersCompare

[ Source](https://github.com/thiagodp/kahlan-matchers)[ Packagist](https://packagist.org/packages/phputil/kahlan)[ RSS](/packages/phputil-kahlan/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (1)Versions (5)Used By (1)

kahlan-matchers
===============

[](#kahlan-matchers)

> Additional matchers for [Kahlan](https://kahlan.github.io/)

Install
-------

[](#install)

> Requires PHP 7 and the extensions `pcre` and `mbstring`

```
composer require phputil/kahlan --dev
```

See [tips](tips.md) for help.

Matchers
--------

[](#matchers)

- Exception:
    - [toThrowAnExceptionThatMatches](spec/ToThrowAnExceptionThatMatches.spec.php) - compares an exception message with the given Regular Expression
    - [toThrowAnExceptionWithCode](spec/ToThrowAnExceptionWithCode.spec.php) - compares an exception code with the given code
    - [toThrowAnExceptionWithClassName](spec/ToThrowAnExceptionWithClassName.spec.php) - compares an exception name with the given class name
- String:
    - [toHaveStringLength](spec/ToHaveStringLength.spec.php) - compares a *multi-byte* string length with the given length

> Suggestions? Please [open an Issue](https://github.com/thiagodp/kahlan-matchers/issues).

License
-------

[](#license)

[MIT](LICENSE) © [Thiago Delgado Pinto](https://github.com/thiagodp)

###  Health Score

20

—

LowBetter than 13% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity36

Early-stage or recently created project

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

Total

4

Last Release

779d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/154324d722a6ee9c252a0338329781084a97af2d0ea9faaf39176df5a689a2ec?d=identicon)[thiagodp](/maintainers/thiagodp)

---

Top Contributors

[![thiagodp](https://avatars.githubusercontent.com/u/2997844?v=4)](https://github.com/thiagodp "thiagodp (6 commits)")

### Embed Badge

![Health badge](/badges/phputil-kahlan/health.svg)

```
[![Health](https://phpackages.com/badges/phputil-kahlan/health.svg)](https://phpackages.com/packages/phputil-kahlan)
```

###  Alternatives

[dms/phpunit-arraysubset-asserts

This package provides ArraySubset and related asserts once deprecated in PHPUnit 8

14429.2M361](/packages/dms-phpunit-arraysubset-asserts)[gong023/assert_chain

enable you to use phpunit assert with method chain

1478.9k3](/packages/gong023-assert-chain)

PHPackages © 2026

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