backendtea / dependency-finder
Find out exactly what classes depend on what other classes
0.0.2
2019-08-10 20:56 UTC
Requires
- php: ^7.2
- nikic/php-parser: ^4.2
- symfony/finder: ^4.3
Requires (Dev)
- doctrine/coding-standard: ^6.0
- infection/infection: ^0.13.3
- phpstan/phpstan: ^0.11
- phpunit/phpunit: ^8.2
This package is auto-updated.
Last update: 2024-12-11 20:31:57 UTC
README
What is this
This library allows you to find the dependencies of a php file.
It was created to help with another libary, that allows you to run tests for only changes files (and their dependencies)
Usage
<?php require_once __DIR__.'/vendor/autoload.php'; use Depend\DependencyFinder; $finder = new DependencyFinder([__DIR__.'/src/', './vendor/psr/container/src', __DIR__.'/tests']); $finder->build(); $deps = $finder->getAllFilesDependingOn(['./tests/Fixtures/Circular/A.php']); foreach ($deps as $dep) { var_dump($dep); } $finder->reBuild(['./src/Domain/User.php', './tests/Domain/User.php', './src/functions.php']);