schnittstabil / finder-by-config
Create Symfony\Component\Finder instances by configuration
1.1.0
2018-03-18 18:54 UTC
Requires
- php: >=5.6.0
- schnittstabil/get: ^2.0 || ^3.0
- symfony/finder: ^3.0 || ^4.0
Requires (Dev)
- schnittstabil/phpunit-starter: ^6.0 || ^7.0
This package is auto-updated.
Last update: 2024-12-26 03:44:28 UTC
README
Create Symfony\Component\Finder instances by configuration
Install
$ composer require schnittstabil/finder-by-config
Usage
{ ... "require": { "schnittstabil/finder-by-config": ... }, "extra": { "you/your-package": { "simple": ["src", "tests", "composer.json"], "extended": { "in": ["."], "name": ["*.php", "*.json"], "notName": ["*Test.php"], "size": ["> 1K"], "exclude": ["build", "vendor"], "ignoreDotFiles": true, "ignoreVCS": true, "followLinks": false, "ignoreUnreadableDirs": false } } } }
$config = json_decode(file_get_contents('composer.json'))->extra->{'you/your-package'}; $finder = \Schnittstabil\FinderByConfig\FinderByConfig::createFinder($config->simple); $finder = \Schnittstabil\FinderByConfig\FinderByConfig::createFinder($config->extended);
Supported configuration options
For details see the Finder Component Documentation.
License
MIT © Michael Mayer