PHPackages                             aklump/gitignore - 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. aklump/gitignore

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

aklump/gitignore
================

Small library for matching gitignore style (glob) patterns.

0.0.3(2y ago)02561BSD-3-ClausePHPPHP &gt;=7.3

Since Oct 19Pushed 1y ago1 watchersCompare

[ Source](https://github.com/aklump/gitignore)[ Packagist](https://packagist.org/packages/aklump/gitignore)[ Docs](https://github.com/aklump/gitignore)[ RSS](/packages/aklump-gitignore/feed)WikiDiscussions main Synced 1mo ago

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

aklump/gitignore
================

[](#aklumpgitignore)

A small library to allow you to work with [.gitignore (glob) patterns](https://git-scm.com/docs/gitignore#_pattern_format).

Test a .gitignore pattern
-------------------------

[](#test-a-gitignore-pattern)

```
$pattern = new \AKlump\GitIgnore\Pattern('foo/**/*.php');
$pattern->matches('foo/bar/baz/lorem.php') === TRUE;
```

Convert to RegEx
----------------

[](#convert-to-regex)

```
$pattern = new \AKlump\GitIgnore\Pattern('settings*.php');
$pattern->toRegex() === '#^settings[^/]*\.php/?$#';
```

Check If String Contains a Pattern
----------------------------------

[](#check-if-string-contains-a-pattern)

```
\AKlump\GitIgnore\Analyzer::containsPattern('foo/**') === TRUE
\AKlump\GitIgnore\Analyzer::containsPattern('foo/bar') === FALSE
```

Known Issues
------------

[](#known-issues)

Not all [special characters](https://pavolkutaj.medium.com/ignore-files-in-gitignore-using-globbing-patterns-4558699bdbf9) are yet supported.

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance33

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity30

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

Total

3

Last Release

822d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/79476f3b82f9c766433c7eb401cbcfc636cd5d5ccf2b2e6b50ea81d1de6c2730?d=identicon)[aklump](/maintainers/aklump)

---

Top Contributors

[![aklump](https://avatars.githubusercontent.com/u/425737?v=4)](https://github.com/aklump "aklump (19 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/aklump-gitignore/health.svg)

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

###  Alternatives

[pingpong/shortcode

Laravel - Simple shortcode based on wordpress shortcode

4040.0k1](/packages/pingpong-shortcode)[marineusde/larapex-charts

Package to provide easy api to build apex charts on Laravel

1214.2k](/packages/marineusde-larapex-charts)[concretecms/migration_tool

Import content into your concrete5 sites. Cross-grade from version 5.6, 5.7 and more.

102.1k](/packages/concretecms-migration-tool)

PHPackages © 2026

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