PHP code example of backendtea / dependency-finder
1. Go to this page and download the library: Download backendtea/dependency-finder library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
backendtea / dependency-finder example snippets
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']);