Download the PHP package paglliac/dependency-analysis without Composer
On this page you can find all versions of the php package paglliac/dependency-analysis. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download paglliac/dependency-analysis
More information about paglliac/dependency-analysis
Files in paglliac/dependency-analysis
Package dependency-analysis
Short Description Library for static analysis modules dependencies in php projects
License MIT
Informations about the package dependency-analysis
PHP Dependency analyzer
PHP DA is tool for check and support dependencies inside your project clear.
For example:
- You have project with 3 root namespaces: Domain, Application, Infrastructure
- You want to be sure dependencies in your project defined as graph
That means all classes from Domain namespace should use only classes from this namespace, and possibly vendor (it s configured).
All classes from Application can use classes from Domain and Application namespaces, but not from Infrastructure, etc
If some classes using dependencies not satisfied defined dependency graph, you give errors in report:
Use cases
It can be useful in some cases for example:
- You want to extract part of your application in separate service, you define valid dependencies and run php-da for investigate workload
- You want to support low coupling in your application, you define valid dependencies and run php-da on your CI server for every MR, only for changed files
- You want to make visible structure changes of your application for all developers, now it is visible in php-da config
Quick start
Install library using composer
Configuration
Add configuration file config.php
to root of your project :
Running
Run dependency validation:
Options:
-c
or--config
is required option with the relative path to config file
Arguments:
[files filter]
list of files for analysis, it's useful to use in CI combine with --diff