PHPackages                             honda/url-pattern-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. honda/url-pattern-matcher

ActiveLibrary

honda/url-pattern-matcher
=========================

Check if a given path matches a given pattern.

1.1.1(4y ago)02.6k3MITPHPPHP ^8

Since Mar 17Pushed 4y agoCompare

[ Source](https://github.com/laravel-honda/url-pattern-matcher)[ Packagist](https://packagist.org/packages/honda/url-pattern-matcher)[ Docs](https://github.com/laravel-honda/url-pattern-matcher)[ RSS](/packages/honda-url-pattern-matcher/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (7)Dependencies (4)Versions (8)Used By (3)

URL Pattern Matcher
===================

[](#url-pattern-matcher)

[![Tests](https://github.com/laravel-honda/url-pattern-matcher/actions/workflows/tests.yml/badge.svg?branch=master)](https://github.com/laravel-honda/url-pattern-matcher/actions/workflows/tests.yml)[![Formats](https://github.com/laravel-honda/url-pattern-matcher/actions/workflows/formats.yml/badge.svg?branch=master)](https://github.com/laravel-honda/url-pattern-matcher/actions/workflows/formats.yml)[![Version](https://camo.githubusercontent.com/352bbfef542368b584515fca2254c132b50b54282e9e77816d4b34d9a4583eda/68747470733a2f2f706f7365722e707567782e6f72672f686f6e64612f75726c2d7061747465726e2d6d6174636865722f76657273696f6e)](//packagist.org/packages/honda/url-pattern-matcher)[![Total Downloads](https://camo.githubusercontent.com/0adcfef8e227d7870d11efd39627278bee6c21ed5560dfaff2ada9e6eab35d38/68747470733a2f2f706f7365722e707567782e6f72672f686f6e64612f75726c2d7061747465726e2d6d6174636865722f646f776e6c6f616473)](//packagist.org/packages/honda/url-pattern-matcher)[![License](https://camo.githubusercontent.com/b327d409fbdf80f00eab97fc65fffc941f27fe85976f5643c161b7896c9c69a9/68747470733a2f2f706f7365722e707567782e6f72672f686f6e64612f75726c2d7061747465726e2d6d6174636865722f6c6963656e7365)](//packagist.org/packages/honda/url-pattern-matcher)

Checks if a given path like (`/articles/4`) matches a given pattern like (`/articles/*`).

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

[](#installation)

You can install the package via composer:

```
composer require honda/url-pattern-matcher
```

Usage
-----

[](#usage)

Trailing forward slashes are ignored so the matcher will match `/example`, `example`, `example/`, `/example/` if given `/example`.

```
use Honda\UrlPatternMatcher\UrlPatternMatcher;
$urlPatternMatcher = new UrlPatternMatcher('/articles/edit');

$urlPatternMatcher->match('/articles');

// See fnmatch() function for reference on how the matching works.
$urlPatternMatcher->match('/articles/*/edit');

// Matches if the path starts with /articles
$urlPatternMatcher->match('^/articles');

// Matches if the path ends with /articles
$urlPatternMatcher->match('/articles$');
```

Testing
-------

[](#testing)

There is 100% code coverage for this package, it's rare, most of the time useless, but it feels good :)

```
composer test
```

**Url Pattern Matcher** was created by **[Félix Dorn](https://twitter.com/afelixdorn)** under the **[MIT license](https://opensource.org/licenses/MIT)**.

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 87.5% 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 ~52 days

Recently: every ~73 days

Total

7

Last Release

1577d ago

Major Versions

0.2.1 → 1.0.02021-04-03

PHP version history (2 changes)0.1.0PHP ^7.4

1.1.0PHP ^8

### Community

Maintainers

![](https://www.gravatar.com/avatar/eeca3822ab1a1281e77e0c4f7bdb671c840417def9884107629952224ce42eb0?d=identicon)[felixdorn](/maintainers/felixdorn)

---

Top Contributors

[![felixdorn](https://avatars.githubusercontent.com/u/55788595?v=4)](https://github.com/felixdorn "felixdorn (21 commits)")[![dependabot-preview[bot]](https://avatars.githubusercontent.com/in/2141?v=4)](https://github.com/dependabot-preview[bot] "dependabot-preview[bot] (2 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")

---

Tags

packagehondaurl-pattern-matcher

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/honda-url-pattern-matcher/health.svg)

```
[![Health](https://phpackages.com/badges/honda-url-pattern-matcher/health.svg)](https://phpackages.com/packages/honda-url-pattern-matcher)
```

PHPackages © 2026

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