Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/smoren/yii2-dependency-finder
- Owner: Smoren
- License: mit
- Created: 2022-12-15T18:44:42.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2022-12-17T17:11:00.000Z (almost 2 years ago)
- Last Synced: 2024-10-11T21:42:21.986Z (27 days ago)
- Topics: dependency, php, yii2, yii2-extension
- Language: PHP
- Homepage:
- Size: 20.5 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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);
```