sikessem / ignorant
π Ignore files by names or paths
Installs: 1 539
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
Requires
- php: ^8.0.22
- sikessem/capsule: ^0.1.0
Requires (Dev)
- pestphp/pest: ^1.22
README
π Ignore files by names or paths
The Ignorant library allows you to check if a path or name is ignored in a pattern list or in a pattern dot (.) file.
Installation
Using composer, you can install Ignorant with the following command:
composer require sikessem/ignorant
Usage
Explore our .gitignore file:
<?php use Sikessem\Ignorant\Ignorefile; require_once "$VENDOR_DIR/autoload.php"; $gitignore = new Ignorefile(__DIR__.'/.gitignore'); $gitignore->contains('/vendor/'); // Returns true $gitignore->contains('/.phpunit*'); // Returns true $gitignore->includes('/vendor/autoload.php'); // Returns true $gitignore->includes('/.phpunit.result.cache'); // Returns true $gitignore->excludes('src'); // Return true $gitignore->excludes('/tests/Unit'); // Return true
License
This library is distributed under the
Security Reports
Please send any sensitive issue to ske@sikessem.com. Thanks!