dettbarn / dependencygraph
Analyse and visualise the PHP class structure obtained from PhpMetrics
Installs: 10
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 16
pkg:composer/dettbarn/dependencygraph
Requires
- graphp/graphviz: 1.*
Requires (Dev)
This package is auto-updated.
Last update: 2026-02-24 18:36:58 UTC
README
This tool can be regarded as an extension to PhpMetrics, originally born in the FLYERALARM ecosystem. The main feature is a visualisation of the class structure in a tree-like fashion.
Setup
composer config minimum-stability dev
composer config prefer-stable true
composer require dettbarn/dependencygraph
How to run
In vendor/bin/dependencygraph, configure the graph depth (MAX_DEPTH) and name patterns.
Then run php vendor/bin/dependencygraph path/to/classes.js 'Name\Of\Root\Class' path/to/package_relations.html 'Root\Package' with your suitable parameters. The graphs should be saved in an output folder, see example below.
Customize output
You can customize more colors in the defaultVertex method.
For more customizations, check out the Graphp library.
