PHPackages                             divineomega/fuzzy-events - 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. divineomega/fuzzy-events

Abandoned → [jord-jd/fuzzy-events](/?search=jord-jd%2Ffuzzy-events)Library[Utility &amp; Helpers](/categories/utility)

divineomega/fuzzy-events
========================

Perform actions based on fuzzy string matches

v4.1.0(1mo ago)161LGPL-3.0-onlyPHPPHP &gt;=7.1CI passing

Since Mar 10Pushed 1mo agoCompare

[ Source](https://github.com/Jord-JD/fuzzy-events)[ Packagist](https://packagist.org/packages/divineomega/fuzzy-events)[ GitHub Sponsors](https://github.com/DivineOmega)[ RSS](/packages/divineomega-fuzzy-events/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (5)Dependencies (3)Versions (5)Used By (0)

Fuzzy Events
============

[](#fuzzy-events)

[![Tests](https://github.com/Jord-JD/fuzzy-events/actions/workflows/tests.yml/badge.svg)](https://github.com/Jord-JD/fuzzy-events/actions/workflows/tests.yml)

Fuzzy events is a PHP package that allows you to perform actions based on a fuzzy string matches.

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

[](#installation)

Install using the following Composer command.

```
composer require jord-jd/fuzzy-events
```

### Usage

[](#usage)

See the following usage example.

```
class Greeting implements FuzzyListenerInterface
{

    public function handle(string $query)
    {
        return 'Hello there!';
    }
}
```

```
$listeners = [
    Greeting::class => [
        'Hello',
        'Hi',
        'Hey',
        'Greetings',
        'Howdy',
        'Hello there',
        'Hi there',
    ],
];

$confidenceThreshold = 75;

$dispatcher = new FuzzyDispatcher($listeners, $confidenceThreshold);

$response = $dispatcher->fire('Greetingz!');

// $response = 'Hello there!'

try {
    $dispatcher->fire('Goodbye!');
} catch (ConfidenceTooLowException $e) {
    // No matches within specified confidence threshold!
}

$confidences = $dispatcher->getConfidences('Hi!');

// $confidences = [
//    Greeting::class => 80
// ]
```

Ranked matches
--------------

[](#ranked-matches)

Use `getRankedConfidences()` when you want every candidate sorted from best to worst, or `getMatches()` to keep only candidates above the dispatcher's threshold (or an explicit minimum).

```
$ranked = $dispatcher->getRankedConfidences('Hello');
$matches = $dispatcher->getMatches('Hello');
$strictMatches = $dispatcher->getMatches('Hello', 95);
```

Confidence and match thresholds must be between 0 and 100. Listener classes and phrases are validated when the dispatcher is constructed, so configuration errors fail before a query is handled.

Matching remains case-sensitive by default. Pass `false` as the optional third constructor argument to compare case-insensitively.

```
$dispatcher = new FuzzyDispatcher($listeners, 75, false);
```

###  Health Score

43

—

FairBetter than 89% of packages

Maintenance94

Actively maintained with recent releases

Popularity7

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 92.9% 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 ~773 days

Total

4

Last Release

31d ago

Major Versions

v1.0.0 → v3.0.02026-02-14

v3.0.0 → v4.0.02026-02-14

### Community

Maintainers

![](https://www.gravatar.com/avatar/c580cdf7c14898fff179cdfc1085892091d5d2f49d917873a12365af9ac77c93?d=identicon)[Jord-JD](/maintainers/Jord-JD)

---

Top Contributors

[![Jord-JD](https://avatars.githubusercontent.com/u/650645?v=4)](https://github.com/Jord-JD "Jord-JD (13 commits)")[![peter279k](https://avatars.githubusercontent.com/u/9021747?v=4)](https://github.com/peter279k "peter279k (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/divineomega-fuzzy-events/health.svg)

```
[![Health](https://phpackages.com/badges/divineomega-fuzzy-events/health.svg)](https://phpackages.com/packages/divineomega-fuzzy-events)
```

###  Alternatives

[tuxones/filament-js-money-field

A Laravel Filament plugin for dynamic international currency masking using JavaScript Intl, supporting flexible currency and locale configuration via closures.

175.9k](/packages/tuxones-filament-js-money-field)

PHPackages © 2026

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