PHP Classes

Yii2 Dependency Finder: Find dependencies of project that uses Yii2

Recommend this page to a friend!
  Info   View files Documentation   View files View files (22)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog (1)    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 16 This week: 1All time: 11,235 This week: 560Up
Version License PHP version Categories
yii2-dependency-find 1.0MIT/X Consortium ...7.4Debug, Tools, Files and Folders, Lang..., P...
Description 

Author

This package can find dependencies of project that uses Yii2.

It can scan the files of a project that is in a given path and finds the dependencies of that project on Yii2 modules.

The package can output the depedencies that it finds in text or CVS formats.

Innovation Award
PHP Programming Innovation award nominee
March 2023
Number 8
Complex projects are often made of packages that provide services to others to reuse the work done by their developers, thus reducing the time the projects can take to develop.

Knowing the dependencies of projects on other packages can be helpful for developers to determine what packages their projects depend on.

This package implements means to find the dependencies of projects that use the Yii2 framework.

Manuel Lemos
Picture of Smoren  Freelight
  Performance   Level  
Name: Smoren Freelight <contact>
Classes: 36 packages by
Country: Russian Federation Russian Federation
Age: 34
All time rank: 290279 in Russian Federation Russian Federation
Week rank: 33 Up2 in Russian Federation Russian Federation Up
Innovation award
Innovation award
Nominee: 15x

Documentation

yii2-dependency-finder

Extension for finding horizontal dependencies of Yii2 modules

How to install to Yii2 project

composer require smoren/yii2-dependency-finder

Usage

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);

  Files folder image Files  
File Role Description
Files folder imagesrc (6 directories)
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files  /  src  
File Role Description
Files folder imageCollections (2 files)
Files folder imageFinders (3 files)
Files folder imageInterfaces (6 files)
Files folder imageStructs (2 files)
Files folder imageWalkers (2 files)
Files folder imageWriters (4 files)

  Files folder image Files  /  src  /  Collections  
File Role Description
  Plain text file ModuleDependencyCollection.php Class Class source
  Plain text file ProjectDependencyCollection.php Class Class source

  Files folder image Files  /  src  /  Finders  
File Role Description
  Plain text file FileDependencyFinder.php Class Class source
  Plain text file ModuleDependencyFinder.php Class Class source
  Plain text file ProjectDependencyFinder.php Class Class source

  Files folder image Files  /  src  /  Interfaces  
File Role Description
  Plain text file CollectionInterface.php Class Class source
  Plain text file FinderInterface.php Class Class source
  Plain text file ModuleInterface.php Class Class source
  Plain text file PathInterface.php Class Class source
  Plain text file WalkerInterface.php Class Class source
  Plain text file WriterInterface.php Class Class source

  Files folder image Files  /  src  /  Structs  
File Role Description
  Plain text file Module.php Class Class source
  Plain text file Path.php Class Class source

  Files folder image Files  /  src  /  Walkers  
File Role Description
  Plain text file ProjectModuleWalker.php Class Class source
  Plain text file ProjectTreeWalker.php Class Class source

  Files folder image Files  /  src  /  Writers  
File Role Description
  Plain text file BaseFileWriter.php Class Class source
  Plain text file CsvWriter.php Class Class source
  Plain text file DetailedTxtWriter.php Class Class source
  Plain text file ShortTxtWriter.php Class Class source

 Version Control Unique User Downloads Download Rankings  
 100%
Total:16
This week:1
All time:11,235
This week:560Up