Download the PHP package inmarelibero/gitignore-checker without Composer
On this page you can find all versions of the php package inmarelibero/gitignore-checker. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download inmarelibero/gitignore-checker
More information about inmarelibero/gitignore-checker
Files in inmarelibero/gitignore-checker
Download inmarelibero/gitignore-checker
More information about inmarelibero/gitignore-checker
Files in inmarelibero/gitignore-checker
Vendor inmarelibero
Package gitignore-checker
Short Description A PHP library to check if a path is ignored by GIT
License MIT
Package gitignore-checker
Short Description A PHP library to check if a path is ignored by GIT
License MIT
Please rate this library. Is it a good library?
Informations about the package gitignore-checker
GitignoreChecker is a PHP library to check if a given paths is ignored by GIT.
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
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
\#
- including subfolders, eg.
All versions of gitignore-checker with dependencies
PHP Build Version
Package Version
Requires
php Version
>=7.1
The package inmarelibero/gitignore-checker contains the following files
Loading the files please wait ...