PHPackages                             ascii-soup/hamcrest-callback-matcher - 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. ascii-soup/hamcrest-callback-matcher

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

ascii-soup/hamcrest-callback-matcher
====================================

Hamcrest matcher that matches against a provided callback.

1.1(10y ago)16.8k1MITPHP

Since Mar 16Pushed 10y ago1 watchersCompare

[ Source](https://github.com/ascii-soup/hamcrest-callback-matcher)[ Packagist](https://packagist.org/packages/ascii-soup/hamcrest-callback-matcher)[ RSS](/packages/ascii-soup-hamcrest-callback-matcher/feed)WikiDiscussions master Synced 1mo ago

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

Hamcrest Callback Matcher
=========================

[](#hamcrest-callback-matcher)

Usage:

```
assertThat("hello", matchesUsing(function($value) { return $value === "hello"; }));
```

Creating new custom matchers
----------------------------

[](#creating-new-custom-matchers)

Creating new custom matchers is made simpler with the callback matcher.

You can use `describedAs()` to provide a better description for the expectation.

```
function myCustomMatcher()
{
    return describedAs('a custom value', new CallbackMatcher(
        function($value) {
            return $value === 'my custom value';
        }
    )
}
```

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity23

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity64

Established project with proven stability

 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

3709d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b33cae78d696700a71298bce53ded626b4aa8e04155d2b3437c0f7c6727ae07d?d=identicon)[ascii-soup](/maintainers/ascii-soup)

---

Top Contributors

[![ascii-soup](https://avatars.githubusercontent.com/u/627657?v=4)](https://github.com/ascii-soup "ascii-soup (4 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/ascii-soup-hamcrest-callback-matcher/health.svg)

```
[![Health](https://phpackages.com/badges/ascii-soup-hamcrest-callback-matcher/health.svg)](https://phpackages.com/packages/ascii-soup-hamcrest-callback-matcher)
```

###  Alternatives

[pocketmine/pocketmine-mp

A server software for Minecraft: Bedrock Edition written in PHP

3.5k74.6k86](/packages/pocketmine-pocketmine-mp)[mettle/sendportal

SendPortal. Open-source self-hosted email marketing. Manage your own newsletters at a fraction of the cost.

2.1k4.3k](/packages/mettle-sendportal)[ramsey/devtools-lib

The library behind ramsey/devtools, allowing for extension of the ramsey/devtools Composer plugin.

2333.9k2](/packages/ramsey-devtools-lib)[crell/envmapper

A simple, fast mapper from environment variables to classed objects.

8713.7k1](/packages/crell-envmapper)[matriphe/larinfo

Display system information (IP address, OS, versions) for Laravel.

4739.9k3](/packages/matriphe-larinfo)[dholmes/bga-workbench

BoardGameArena Workbench

375.3k](/packages/dholmes-bga-workbench)

PHPackages © 2026

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