PHPackages                             sixty-nine/class-grapher - 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. sixty-nine/class-grapher

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

sixty-nine/class-grapher
========================

Generate a basic class diagram in GraphViz DOT format from PHP files

61PHP

Since Aug 17Pushed 9y ago1 watchersCompare

[ Source](https://github.com/sixty-nine/class-grapher)[ Packagist](https://packagist.org/packages/sixty-nine/class-grapher)[ RSS](/packages/sixty-nine-class-grapher/feed)WikiDiscussions refactoring Synced 1mo ago

READMEChangelogDependenciesVersions (3)Used By (0)

\#Class Grapher

[![Build Status](https://camo.githubusercontent.com/d49112c54e9729d71955ff25cf08a44135ecf986bffc650de28f8accd24d896a/68747470733a2f2f7365637572652e7472617669732d63692e6f72672f73697874792d6e696e652f436c617373477261706865722e706e67)](http://travis-ci.org/sixty-nine/ClassGrapher) [![Code Climate](https://camo.githubusercontent.com/fade18213f8522e5aa4232ab7f06f51a7885c3250f2d2d14b9d088e8e15f8da2/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f73697874792d6e696e652f436c617373477261706865722f6261646765732f6770612e737667)](https://codeclimate.com/github/sixty-nine/ClassGrapher) [![Dependency Status](https://camo.githubusercontent.com/423a1336827edbf3671f7be7889c23c1aa262080878f92038bd3a374aae37885/68747470733a2f2f67656d6e617369756d2e636f6d2f73697874792d6e696e652f436c617373477261706865722e737667)](https://gemnasium.com/sixty-nine/ClassGrapher)

This application will generate a basic class diagram in GraphViz DOT format from the PHP files found in the path given as parameter.

The goal of the project is not to get an exact and detailed UML view, but rather to provide the programmer with a quick way to figure out how some code is structured.

The grapher does not use PHP reflection so that there is no need to actually instanciate the classes that will be shown in the diagram. It means you can graph any set of PHP files, even if there are missing dependencies.

The grapher supports namespaced PHP 5.3. However, to reduce the width of the rendered graph, the full namespaces are not shown in the diagram. This can easily be changed in the GraphVizBuilder::addNode method.

\##Installation

This code uses external components that will be installed with composer.

#### Download composer

[](#download-composer)

See

You have to put the composer.phar file in the root directory of the project.

```
cd project_dir # The folder where you have put the ClassGrapher files
wget http://getcomposer.org/composer.phar
chmod +x composer.phar

```

#### Install the vendors

[](#install-the-vendors)

```
./composer.phar install

```

\##Usage

Assumed you have ImageMagick installed you can run the following command to generate a class diagram of the class grapher code:

```
php devtools graph src/ | dot -T png | display

```

Options
-------

[](#options)

```
Usage:
  graph [options] [--]

Arguments:
  dir

Options:
      --groups          Group by namespace
      --no-edges        Don't show the edges
      --no-orphans      Don't show orphan nodes

```

\##Running the tests

```
phpunit -c tests/

```

License
-------

[](#license)

This code is distributed under the MIT license.

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor1

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

### Community

Maintainers

![](https://www.gravatar.com/avatar/dfc1e5e865ece460316fc1dd020ce25be61e4d2c189be3cb7875d5fc2ba77ca0?d=identicon)[sixtynine.db](/maintainers/sixtynine.db)

---

Top Contributors

[![sixty-nine](https://avatars.githubusercontent.com/u/398679?v=4)](https://github.com/sixty-nine "sixty-nine (12 commits)")

### Embed Badge

![Health badge](/badges/sixty-nine-class-grapher/health.svg)

```
[![Health](https://phpackages.com/badges/sixty-nine-class-grapher/health.svg)](https://phpackages.com/packages/sixty-nine-class-grapher)
```

###  Alternatives

[cybercog/laravel-paket

Composer personal web interface. Manage Laravel dependencies without switching to command line!

1753.3k](/packages/cybercog-laravel-paket)[laravel-frontend-presets/inertiajs

A Laravel frontend preset to get you up and running with Inertia.js

1464.5k](/packages/laravel-frontend-presets-inertiajs)[dominicwatts/faker

Console based fake data generator - just generate what you need

413.5k](/packages/dominicwatts-faker)[markwalet/laravel-packagist

A Laravel wrapper for the `spatie/packagist-api` package.

132.1k](/packages/markwalet-laravel-packagist)

PHPackages © 2026

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