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

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

inmarelibero/gitignore-checker
==============================

A PHP library to check if a path is ignored by GIT

1.0.4(2y ago)587.7k↑74.7%5[5 issues](https://github.com/inmarelibero/gitignore-checker/issues)2MITPHPPHP &gt;=7.1CI failing

Since Mar 4Pushed 2y ago3 watchersCompare

[ Source](https://github.com/inmarelibero/gitignore-checker)[ Packagist](https://packagist.org/packages/inmarelibero/gitignore-checker)[ RSS](/packages/inmarelibero-gitignore-checker/feed)WikiDiscussions master Synced 2d ago

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

**GitignoreChecker** is a PHP library to check if a given paths is ignored by GIT.

USAGE
=====

[](#usage)

Initialize an object, providing the GIT repository root folder:

```
$gitIgnoreChecker = new GitIgnoreChecker(__DIR__);

```

You can now easily check if a given path is ignored by some `.gitignore` rule, with:

```
 $gitIgnoreChecker->isPathIgnored('/foo');  // true|false
 $gitIgnoreChecker->isPathIgnored('/README');
 $gitIgnoreChecker->isPathIgnored('/foo/bar');
 $gitIgnoreChecker->isPathIgnored('/foo/bar/baz');
 $gitIgnoreChecker->isPathIgnored('/.foo');
 ...

```

RUN TESTS
=========

[](#run-tests)

After making sure you installed dependencies with command `composer install`, you can run tests by executing:

```
php bin/phpunit

```

or executing:

```
composer test

```

---

Todo:

- do more tests: figure out some more cases and edge cases and add them to the current test suite

Done:

- handled most common `gitignore`, including the ones:
    - including subfolders, eg.`foo/bar`
    - including `*`, eg.`foo/*/bar`
    - including `**`, eg.`foo/**/bar`
    - beginning with `!`
    - beginning with `#`
    - beginning with `\#`

---

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity39

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 84.6% 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 ~269 days

Recently: every ~316 days

Total

8

Last Release

791d ago

Major Versions

0.1.1 → 1.0.02020-11-17

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/254808?v=4)[Emanuele Gaspari](/maintainers/inmarelibero)[@inmarelibero](https://github.com/inmarelibero)

---

Top Contributors

[![inmarelibero](https://avatars.githubusercontent.com/u/254808?v=4)](https://github.com/inmarelibero "inmarelibero (22 commits)")[![BrianHenryIE](https://avatars.githubusercontent.com/u/4720401?v=4)](https://github.com/BrianHenryIE "BrianHenryIE (3 commits)")[![sensorario](https://avatars.githubusercontent.com/u/820248?v=4)](https://github.com/sensorario "sensorario (1 commits)")

---

Tags

gitvcsgitignore

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[czproject/git-php

Library for work with Git repository in PHP.

5645.2M112](/packages/czproject-git-php)[cypresslab/gitelephant

An abstraction layer for git written in PHP

6131.2M31](/packages/cypresslab-gitelephant)[teqneers/php-stream-wrapper-for-git

Git Stream Wrapper for PHP

2892.2M8](/packages/teqneers-php-stream-wrapper-for-git)[marcocesarato/php-conventional-changelog

Generate changelogs and release notes from a project's commit messages and metadata and automate versioning with semver.org and conventionalcommits.org

2521.5M118](/packages/marcocesarato-php-conventional-changelog)[klaussilveira/gitter

Gitter allows you to interact in an object oriented manner with Git repositories.

19733.4k5](/packages/klaussilveira-gitter)[ramsey/conventional-commits

A PHP library for creating and validating commit messages according to the Conventional Commits specification. Includes a CaptainHook action!

1931.6M155](/packages/ramsey-conventional-commits)

PHPackages © 2026

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