PHPackages                             jbzoo/composer-graph - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. jbzoo/composer-graph

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

jbzoo/composer-graph
====================

Render composer.json + composer.lock dependencies graph

7.1.0(7mo ago)66741.6k↓36%7[2 issues](https://github.com/JBZoo/Composer-Graph/issues)2MITPHPPHP ^8.2CI passing

Since Jul 14Pushed 7mo ago2 watchersCompare

[ Source](https://github.com/JBZoo/Composer-Graph)[ Packagist](https://packagist.org/packages/jbzoo/composer-graph)[ RSS](/packages/jbzoo-composer-graph/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (7)Versions (21)Used By (2)

JBZoo / Composer-Graph
======================

[](#jbzoo--composer-graph)

[![CI](https://github.com/JBZoo/Composer-Graph/actions/workflows/main.yml/badge.svg?branch=master)](https://github.com/JBZoo/Composer-Graph/actions/workflows/main.yml?query=branch%3Amaster)[![Coverage Status](https://camo.githubusercontent.com/7182ddec76462d920394d1fb72dc3e3a7fd655022291dff34bfb3843e8f35f72/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f4a425a6f6f2f436f6d706f7365722d47726170682f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/JBZoo/Composer-Graph?branch=master)[![Psalm Coverage](https://camo.githubusercontent.com/6d52c58bc3838baa70f4abd31478c9c0991f89ea4ce4da60716fd3421c2f51c0/68747470733a2f2f73686570686572642e6465762f6769746875622f4a425a6f6f2f436f6d706f7365722d47726170682f636f7665726167652e737667)](https://shepherd.dev/github/JBZoo/Composer-Graph)[![Psalm Level](https://camo.githubusercontent.com/87a7c445628f7ee43d367cec08b1d63a9f85f813c496d2b7f6f00b1463987e98/68747470733a2f2f73686570686572642e6465762f6769746875622f4a425a6f6f2f436f6d706f7365722d47726170682f6c6576656c2e737667)](https://shepherd.dev/github/JBZoo/Composer-Graph)[![CodeFactor](https://camo.githubusercontent.com/f793634d3c8eda62a41d394a18d5e56599ee98424884d2b86fa1e2f5c0c57346/68747470733a2f2f7777772e636f6465666163746f722e696f2f7265706f7369746f72792f6769746875622f6a627a6f6f2f636f6d706f7365722d67726170682f6261646765)](https://www.codefactor.io/repository/github/jbzoo/composer-graph/issues)

[![Stable Version](https://camo.githubusercontent.com/5ed660d479c301d5c559f6cec1317fbf738449c33717090bed8de6a97b76edfc/68747470733a2f2f706f7365722e707567782e6f72672f6a627a6f6f2f636f6d706f7365722d67726170682f76657273696f6e)](https://packagist.org/packages/jbzoo/composer-graph/)[![Total Downloads](https://camo.githubusercontent.com/32af4ad59800ae2bb8e8b4d2e9a3f4dd728586b752e36621680ab367c346e782/68747470733a2f2f706f7365722e707567782e6f72672f6a627a6f6f2f636f6d706f7365722d67726170682f646f776e6c6f616473)](https://packagist.org/packages/jbzoo/composer-graph/stats)[![Dependents](https://camo.githubusercontent.com/2f2d241e93462398ab56cd7eaf18e01b0fa62fb05c41ae7dbcbf234ec0cab405/68747470733a2f2f706f7365722e707567782e6f72672f6a627a6f6f2f636f6d706f7365722d67726170682f646570656e64656e7473)](https://packagist.org/packages/jbzoo/composer-graph/dependents?order_by=downloads)[![GitHub License](https://camo.githubusercontent.com/db03c72da4781ea8506f90c5225c73f48045dce8b4560a5d40ad465c4605a358/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6a627a6f6f2f636f6d706f7365722d6772617068)](https://github.com/JBZoo/Composer-Graph/blob/master/LICENSE)

- [Installation](#installation)
- [Usage](#usage)
- [Examples](#examples)
    - [Default output (no args) - minimal view](#default-output-no-args---minimal-view)
    - [Default output with PHP extensions (modules)](#default-output-with-php-extensions-modules)
    - [Default output with versions of packages and relations](#default-output-with-versions-of-packages-and-relations)
    - [Show suggested packages which are not installed](#show-suggested-packages-which-are-not-installed)
    - [Show dev dependencies](#show-dev-dependencies)
    - [Full Report](#full-report)
- [Unit tests and check code style](#unit-tests-and-check-code-style)
- [License](#license)
- [See Also](#see-also)

Installation
------------

[](#installation)

**Requirements:** PHP 8.2+

```
composer require        jbzoo/composer-graph # For a specific project
composer global require jbzoo/composer-graph # As global tool

# OR use phar file.
wget https://github.com/JBZoo/Composer-Graph/releases/latest/download/composer-graph.phar
```

Usage
-----

[](#usage)

```
$ php ./vendor/bin/composer-graph --help

Usage:
  build [options]

Options:
  -r, --root=ROOT                The path has to contain "composer.json" and "composer.lock" files [default: "./"]
  -o, --output=OUTPUT            Path to html output. [default: "./build/composer-graph.html"]
  -f, --format=FORMAT            Output format. Available options: html,mermaid [default: "html"]
  -D, --direction=DIRECTION      Direction of graph. Available options: LR,TB,BT,RL [default: "LR"]
  -p, --show-php                 Show PHP-node
  -e, --show-ext                 Show all ext-* nodes (PHP modules)
  -d, --show-dev                 Show all dev dependencies
  -s, --show-suggests            Show not installed suggests packages
  -l, --show-link-versions       Show version requirements in links
  -P, --show-package-versions    Show version of packages
  -O, --abc-order                Strict ABC ordering nodes in graph. It's fine tuning, sometimes it useful.
      --no-progress              Disable progress bar animation for logs. It will be used only for text output format.
      --mute-errors              Mute any sort of errors. So exit code will be always "0" (if it's possible).
                                 It has major priority then --non-zero-on-error. It's on your own risk!
      --stdout-only              For any errors messages application will use StdOut instead of StdErr. It's on your own risk!
      --non-zero-on-error        None-zero exit code on any StdErr message.
      --timestamp                Show timestamp at the beginning of each message.It will be used only for text output format.
      --profile                  Display timing and memory usage information.
      --output-mode=OUTPUT-MODE  Output format. Available options:
                                 text - Default text output format, userfriendly and easy to read.
                                 cron - Shortcut for crontab. It's basically focused on human-readable logs output.
                                 It's combination of --timestamp --profile --stdout-only --no-progress -vv.
                                 logstash - Logstash output format, for integration with ELK stack.
                                  [default: "text"]
      --cron                     Alias for --output-mode=cron. Deprecated!
  -h, --help                     Display help for the given command. When no command is given display help for the build command
      --silent                   Do not output any message
  -q, --quiet                    Only errors are displayed. All other output is suppressed
  -V, --version                  Display this application version
      --ansi|--no-ansi           Force (or disable --no-ansi) ANSI output
  -n, --no-interaction           Do not ask any interactive question
  -v|vv|vvv, --verbose           Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

```

Examples
--------

[](#examples)

All examples are screenshots based on the package [JBZoo/Toolbox](https://github.com/JBZoo/Toolbox).

### Default output (no args) - minimal view

[](#default-output-no-args---minimal-view)

```
php ./vendor/bin/composer-graph
```

[![Example](https://raw.githubusercontent.com/JBZoo/Composer-Graph/master/resources/jbzoo-minimal.png)](https://raw.githubusercontent.com/JBZoo/Composer-Graph/master/resources/jbzoo-minimal.png)

### Default output with PHP extensions (modules)

[](#default-output-with-php-extensions-modules)

```
php ./vendor/bin/composer-graph  --show-ext
```

[![Example](https://raw.githubusercontent.com/JBZoo/Composer-Graph/master/resources/jbzoo-extensions.png)](https://raw.githubusercontent.com/JBZoo/Composer-Graph/master/resources/jbzoo-extensions.png)

### Default output with versions of packages and relations

[](#default-output-with-versions-of-packages-and-relations)

```
php ./vendor/bin/composer-graph  --show-link-versions  --show-package-versions
```

[![Example](https://raw.githubusercontent.com/JBZoo/Composer-Graph/master/resources/jbzoo-versions.png)](https://raw.githubusercontent.com/JBZoo/Composer-Graph/master/resources/jbzoo-versions.png)

### Show suggested packages which are not installed

[](#show-suggested-packages-which-are-not-installed)

```
php ./vendor/bin/composer-graph  --show-suggests
```

[![Example](https://raw.githubusercontent.com/JBZoo/Composer-Graph/master/resources/jbzoo-suggests.png)](https://raw.githubusercontent.com/JBZoo/Composer-Graph/master/resources/jbzoo-suggests.png)

### Show dev dependencies

[](#show-dev-dependencies)

```
php ./vendor/bin/composer-graph  --show-dev
```

[![Example](https://raw.githubusercontent.com/JBZoo/Composer-Graph/master/resources/jbzoo-dev.png)](https://raw.githubusercontent.com/JBZoo/Composer-Graph/master/resources/jbzoo-dev.png)

### Full Report

[](#full-report)

All options are enabled but `--show-php` (too many packages).

```
php ./vendor/bin/composer-graph            \
                 --show-ext                \
                 --show-dev                \
                 --show-suggests           \
                 --show-link-versions      \
                 --show-package-versions
```

[![Example](https://raw.githubusercontent.com/JBZoo/Composer-Graph/master/resources/jbzoo-full-without-php.png)](https://raw.githubusercontent.com/JBZoo/Composer-Graph/master/resources/jbzoo-full-without-php.png)

Unit tests and check code style
-------------------------------

[](#unit-tests-and-check-code-style)

```
make update
make test-all
```

License
-------

[](#license)

MIT

See Also
--------

[](#see-also)

- [CI-Report-Converter](https://github.com/JBZoo/CI-Report-Converter) - Converting different error reports for deep compatibility with popular CI systems.
- [Composer-Diff](https://github.com/JBZoo/Composer-Diff) - See what packages have changed after `composer update`.
- [Mermaid-PHP](https://github.com/JBZoo/Mermaid-PHP) - Generate diagrams and flowcharts with the help of the mermaid script language.
- [Utils](https://github.com/JBZoo/Utils) - Collection of useful PHP functions, mini-classes, and snippets for every day.
- [Image](https://github.com/JBZoo/Image) - Package provides object-oriented way to manipulate with images as simple as possible.
- [Data](https://github.com/JBZoo/Data) - Extended implementation of ArrayObject. Use files as config/array.
- [Retry](https://github.com/JBZoo/Retry) - Tiny PHP library providing retry/backoff functionality with multiple backoff strategies and jitter support.
- [SimpleTypes](https://github.com/JBZoo/SimpleTypes) - Converting any values and measures - money, weight, exchange rates, length, ...

###  Health Score

55

—

FairBetter than 98% of packages

Maintenance62

Regular maintenance activity

Popularity47

Moderate usage in the ecosystem

Community18

Small or concentrated contributor base

Maturity76

Established project with proven stability

 Bus Factor1

Top contributor holds 96.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~100 days

Recently: every ~288 days

Total

20

Last Release

232d ago

Major Versions

1.6.1 → 7.0.02023-07-09

PHP version history (5 changes)1.0.0PHP &gt;=7.2

1.0.1PHP ^7.2

1.6.0PHP &gt;=7.4

7.0.0PHP ^8.1

7.1.0PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/75e6de2785f6d099699f430ff58404af4fc0e83060d2953028c9664a54704a5f?d=identicon)[smetdenis](/maintainers/smetdenis)

---

Top Contributors

[![SmetDenis](https://avatars.githubusercontent.com/u/1118678?v=4)](https://github.com/SmetDenis "SmetDenis (77 commits)")[![elpadi](https://avatars.githubusercontent.com/u/1967321?v=4)](https://github.com/elpadi "elpadi (2 commits)")[![bumbummen99](https://avatars.githubusercontent.com/u/4533331?v=4)](https://github.com/bumbummen99 "bumbummen99 (1 commits)")

---

Tags

composercomposer-dependencycomposer-graphcomposer-packagedependenciesdiagramjbzoomermaidmermaid-diagramsmermaidjsphpcomposercomposer dependencygraphdiagramdependenciesjbzoocomposer-packagesmermaidjscomposer-graph

### Embed Badge

![Health badge](/badges/jbzoo-composer-graph/health.svg)

```
[![Health](https://phpackages.com/badges/jbzoo-composer-graph/health.svg)](https://phpackages.com/packages/jbzoo-composer-graph)
```

###  Alternatives

[icanhazstring/composer-unused

Show unused packages by scanning your code

1.7k7.0M188](/packages/icanhazstring-composer-unused)[shipmonk/composer-dependency-analyser

Fast detection of composer dependency issues (dead dependencies, shadow dependencies, misplaced dependencies)

6156.7M435](/packages/shipmonk-composer-dependency-analyser)[composer/satis

Simple Repository Generator

3.3k1.4M17](/packages/composer-satis)[franzl/studio

Develop your Composer libraries with style

1.1k634.5k15](/packages/franzl-studio)[clue/phar-composer

Simple phar creation for any project managed via Composer

862881.6k29](/packages/clue-phar-composer)[jbzoo/composer-diff

See what has changed after a composer update.

53888.9k1](/packages/jbzoo-composer-diff)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
