Generates rich dependency diagrams for your composer-based PHP project.
Above you can see:
- Dotted lines indicate a dev dependency.
- Bold lines indicate a direct dependency.
- Package version constraints listed on the lines.
- Licence information
- Red nodes indicate a package with security issues.
- Orange nodes are abandonned.
- Yellow nodes are outdated.
@1.0.0indicates the installed version.=1.0.0indicates the latest version.
- The distance from the root package is shown as
+[0-n]
You could install it as follows:
git clone git@github.com:dantleech/depgraph
cd depgraph
composer install
ln -s $(pwd)/bin/depgraph $HOME/.local/bin/depgraphYou could also include it as a project dependency if you want:
composer require --dev dantleech/depgraph- Limit to production or development packages (
--no-dev--no-prod). - Limit depth of graph (
--max-depth=2) - Highlight packages with CVEs (
--audit) - Highlight outdated packages (
--outdated)
Warning
Depgraph generates Graphviz Dot files. You will need to install the Graphviz
on your operating system to access the dot binary.
The depgraph script will output a Graphviz Dot file to stdout. You can
pipe it directly to the dot binary to generate a diagram:
depgraph | dot -Tsvg -ograph.svg
Specify a composer file:
depgraph path/to/my/composer.json | dot -Tsvg -ograph.svg
Do the slower things and output to a PNG:
depgraph path/to/my/composer.json --audit --outdated | dot -Tpng -ograph.png
🩸 made with blood and tears by you 🫵