PHPackages                             ray/object-visual-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. ray/object-visual-grapher

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

ray/object-visual-grapher
=========================

1.0.0(5y ago)7415.7k—2.2%1MITPHPPHP &gt;=7.1.0

Since Jan 17Pushed 3y ago2 watchersCompare

[ Source](https://github.com/ray-di/Ray.ObjectGrapher)[ Packagist](https://packagist.org/packages/ray/object-visual-grapher)[ RSS](/packages/ray-object-visual-grapher/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (8)Versions (4)Used By (1)

Ray.ObjectGrapher
=================

[](#rayobjectgrapher)

*Using ObjectGrapher to visualize Ray.Di applications*

[![fake](https://user-images.githubusercontent.com/529021/72650686-866ec100-39c4-11ea-8b49-2d86d991dc6d.png)](https://user-images.githubusercontent.com/529021/72650686-866ec100-39c4-11ea-8b49-2d86d991dc6d.png)

Grapher
-------

[](#grapher)

When you've written a sophisticated application, [Ray.Di](https://github.com/ray-di/Ray.Di)'s rich introspection API can describe the object graph in detail. This grapher exposes this data as an easily understandable visualization. It can show the bindings and dependencies from several classes in a complex application in a unified diagram.

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

[](#installation)

You can install the ObjectGrapher with composer:

```
composer --dev require ray/object-visual-grapher

```

### Generating a .dot file

[](#generating-a-dot-file)

Ray.Di's grapher leans heavily on [GraphViz](http://www.graphviz.org/), an open source graph visualization package. It cleanly separates graph specification from visualization and layout. To produce a graph `.dot` file for an `Injector`, you can use the following code:

```
use Ray\ObjectGrapher\ObjectGrapher;

$dot = (new ObjectGrapher)(new FooModule);
file_put_contents('path/to/file', $dot);
```

### The .dot file

[](#the-dot-file)

Executing the code above produces a `.dot` file that specifies a graph. Each entry in the file represents either a node or an edge in the graph. Here's a sample `.dot` file:

```
digraph injector {
graph [rankdir=TB];
dependency_BEAR_Resource_ResourceInterface_ [style=dashed, margin=0.02, label=BEAR\\Resource\\ResourceInterface>, shape=box]
dependency_BEAR_Resource_FactoryInterface_ [style=dashed, margin=0.02, label=BEAR\\Resource\\FactoryInterface>, shape=box]
dependency_BEAR_Resource_ResourceInterface_ -> class_BEAR_Resource_Resource [style=dashed, arrowtail=none, arrowhead=onormal]
dependency_BEAR_Resource_FactoryInterface_ -> class_BEAR_Resource_Factory [style=dashed, arrowtail=none, arrowhead=onormal]
```

### Rendering the .dot file

[](#rendering-the-dot-file)

Download a [Graphviz viewer](http://www.graphviz.org/) for your platform, and use it to render the `.dot` file.

On Linux, you can use the command-line `dot` tool to convert `.dot` files into images.

```
  dot -T png my_injector.dot > my_injector.png
```

#### Graph display

[](#graph-display)

Edges:

- **Solid edges** represent dependencies from implementations to the types they depend on.
- **Dashed edges** represent bindings from types to their implementations.
- **Double arrows** indicate that the binding or dependency is to a `Provider`.

Nodes:

- Implementation types are given *black backgrounds*.
- Implementation instances have *gray backgrounds*.

---

*This document is mostly taken from .*

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity40

Moderate usage in the ecosystem

Community10

Small or concentrated contributor base

Maturity54

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.

###  Release Activity

Cadence

Every ~153 days

Total

2

Last Release

2159d ago

Major Versions

0.1.0 → 1.0.02020-06-19

### Community

Maintainers

![](https://www.gravatar.com/avatar/db4fc75ffc631168d0d7143b6f2c24b1534dfb921212bd851c026c5cbbb1344d?d=identicon)[koriym](/maintainers/koriym)

---

Top Contributors

[![koriym](https://avatars.githubusercontent.com/u/529021?v=4)](https://github.com/koriym "koriym (85 commits)")

---

Tags

dependency-injectionobject-graphobject-visualizerray-di

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/ray-object-visual-grapher/health.svg)

```
[![Health](https://phpackages.com/badges/ray-object-visual-grapher/health.svg)](https://phpackages.com/packages/ray-object-visual-grapher)
```

###  Alternatives

[nystudio107/craft-webperf

Webperf helps you build &amp; maintain high quality websites through Real User Measurement of your website's performance

2540.9k1](/packages/nystudio107-craft-webperf)

PHPackages © 2026

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