Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/smoren/yii2-dependency-finder

Extension for finding horizontal dependencies of Yii2 modules
https://github.com/smoren/yii2-dependency-finder

dependency php yii2 yii2-extension

Last synced: 1 day ago
JSON representation

Extension for finding horizontal dependencies of Yii2 modules

Awesome Lists containing this project

README

        

# yii2-dependency-finder
Extension for finding horizontal dependencies of Yii2 modules

### How to install to Yii2 project
```
composer require smoren/yii2-dependency-finder
```

### Usage

```php
use Smoren\Yii2\DependencyFinder\Finders\ProjectDependencyFinder;
use Smoren\Yii2\DependencyFinder\Structs\Path;
use Smoren\Yii2\DependencyFinder\Writers\ShortTxtWriter;
use Smoren\Yii2\DependencyFinder\Writers\ShortTxtWriter;
use Smoren\Yii2\DependencyFinder\Writers\DetailedTxtWriter;
use Smoren\Yii2\DependencyFinder\Writers\CsvWriter;

$dependencyFinder = new ProjectDependencyFinder(new Path(dirname(__DIR__)));
$dependencyCollection = $dependencyFinder->find();

print_r($dependencyCollection->getSummary());

$writer = new ShortTxtWriter(new Path(dirname(__DIR__), 'logs/dependencies_short.txt'));
$writer->write($dependencyCollection);

$writer = new DetailedTxtWriter(new Path(dirname(__DIR__), 'logs/dependencies_detailed.txt'));
$writer->write($dependencyCollection);

$writer = new CsvWriter(new Path(dirname(__DIR__), 'logs/dependencies.csv'));
$writer->write($dependencyCollection);
```