dantleech/depgraph

Comprehensable Composer PHP dependency diagrams for your small business or enterprise.

Maintainers

Package info

github.com/dantleech/depgraph

pkg:composer/dantleech/depgraph

Transparency log

Fund package maintenance!

dantleech

Statistics

Installs: 0

Dependents: 0

Suggesters: 0

Stars: 7

Open Issues: 4

1.0.2 2026-07-12 17:51 UTC

This package is auto-updated.

Last update: 2026-07-12 19:11:55 UTC


README

CI

Generates rich dependency diagrams for your composer-based PHP project.

Image

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.0 indicates the installed version.
    • =1.0.0 indicates the latest version.
  • The distance from the root package is shown as +[0-n]
Image

Installation

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/depgraph

You could also include it as a project dependency if you want:

composer require --dev dantleech/depgraph

Features

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

Usage

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 🫵