PHPackages                             phpdepend/phpdepend - 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. [Testing &amp; Quality](/categories/testing)
4. /
5. phpdepend/phpdepend

ActiveLibrary[Testing &amp; Quality](/categories/testing)

phpdepend/phpdepend
===================

PHP static analysis tool

0.1.0(1y ago)17592[2 issues](https://github.com/phpdepend/phpdepend/issues)[1 PRs](https://github.com/phpdepend/phpdepend/pulls)MITPHP

Since Oct 4Pushed 1y ago1 watchersCompare

[ Source](https://github.com/phpdepend/phpdepend)[ Packagist](https://packagist.org/packages/phpdepend/phpdepend)[ Docs](https://phpdepend.org/)[ GitHub Sponsors](https://github.com/sponsors/heiglandreas)[ GitHub Sponsors](https://github.com/sponsors/sebastianfeldmann)[ RSS](/packages/phpdepend-phpdepend/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (1)Versions (5)Used By (0)

PHPDepend
=========

[](#phpdepend)

A tool to create dependency related visualizations based on raw-data created via the [callmap plugin](https://github.com/phpdepend/callmap) for PHPStan.

To create the raw-data required you will need to run these commands:

```
# Install PHPStan
composer require --dev phpstan/phpstan
# Install callmap-plugin
composer require --dev phpdepend/callmap
# parse the sources and generate the callmap.json file
./vendor/bin/phpstan analyse -c vendor/phpdepend/callmap/callmap.neon [path/to/your/sources]
```

This will create a file `callmap.json` in your current working directory which is the base for all following commands.

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

[](#installation)

PHPDepend can be installed via

### composer

[](#composer)

Installation via composer is straightforward

```
composer require --dev phpdepend/phpdepend
```

This will make PHPDepend available via `./vendor/bin/phpdepend`

### phive

[](#phive)

Installation via phive is also possible. This will especially check the signature matches so that you can trust that the downloaded PHAR is the one that was signed during the build.

```
phive install phpdepend/phpdepend
```

This will make PHPDepend available via `./tools/phpdepend`

### PHAR-Download

[](#phar-download)

You can also download the latest PHAR file from the relase-page.

```
curl -LO https://api.getlatestassets/github/phpdepend/phpdepend/phpdepend.phar
chmod a+x phpdepend.phar
```

This will make PHPDepend available via `./phpdepend.phar`

Dependency Matrix
-----------------

[](#dependency-matrix)

Create a dependency matrix to see what part of your application is depending on what other parts.

### Usage:

[](#usage)

```
phpdepend matrix
```

This will create a HTML-file in the current folder whose content looks like this:

[![Example output](dependency-matrix.png)](dependency-matrix.png)

Dependency Graph
----------------

[](#dependency-graph)

Create an overview of your applications method-calls. Graph generates a PlantUML file from a CallMap-JSON file.

### Usage

[](#usage-1)

```
phpdepend graph
```

This will generate a PlantUML file `callmap.plantuml` in the current directory.

You can use this file to generate a PNG os SVG using a PlantUML renderer like at

Alternatively you can use the plantuml-docker image like this:

```
# Render a PNG file from the callmap.plantuml file
docker run -v "$(pwd):/app" -w "/app" ghcr.io/plantuml/plantuml callmap.plantuml
```

For the [`phpdepend/callmap`](https://github.com/phpdepend/callmap) plugin that should generate something like this:

[![Example output](callmap.png)](callmap.png)

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance34

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity32

Early-stage or recently created project

 Bus Factor1

Top contributor holds 76.5% 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

Unknown

Total

1

Last Release

590d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5ae5183aaad2bc7453230704bd6991dc6ccbcd6e775c6a29efdc94350a69f247?d=identicon)[heiglandreas](/maintainers/heiglandreas)

![](https://avatars.githubusercontent.com/u/9250358?v=4)[Sebastian Feldmann](/maintainers/sebastianfeldmann)[@sebastianfeldmann](https://github.com/sebastianfeldmann)

---

Top Contributors

[![sebastianfeldmann](https://avatars.githubusercontent.com/u/9250358?v=4)](https://github.com/sebastianfeldmann "sebastianfeldmann (26 commits)")[![heiglandreas](https://avatars.githubusercontent.com/u/91998?v=4)](https://github.com/heiglandreas "heiglandreas (7 commits)")[![staabm](https://avatars.githubusercontent.com/u/120441?v=4)](https://github.com/staabm "staabm (1 commits)")

---

Tags

hacktoberfestphpstatic-analysisstatic analysis

### Embed Badge

![Health badge](/badges/phpdepend-phpdepend/health.svg)

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

###  Alternatives

[vimeo/psalm

A static analysis tool for finding errors in PHP applications

5.8k77.5M6.7k](/packages/vimeo-psalm)[phan/phan

A static analyzer for PHP

5.6k11.2M1.1k](/packages/phan-phan)[phpstan/phpstan

PHPStan - PHP Static Analysis Tool

13.9k341.8M29.6k](/packages/phpstan-phpstan)[maglnet/composer-require-checker

CLI tool to analyze composer dependencies and verify that no unknown symbols are used in the sources of a package

99810.9M671](/packages/maglnet-composer-require-checker)[wp-coding-standards/wpcs

PHP\_CodeSniffer rules (sniffs) to enforce WordPress coding conventions

2.7k42.5M1.6k](/packages/wp-coding-standards-wpcs)[overtrue/phplint

`phplint` is a tool that can speed up linting of php files by running several lint processes at once.

1.0k13.2M726](/packages/overtrue-phplint)

PHPackages © 2026

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