PHPackages                             innmind/stack-trace - 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. innmind/stack-trace

ActiveLibrary

innmind/stack-trace
===================

Tool to inspect exception stack trace

5.0.0(3mo ago)051.1k↓27.3%12MITPHPPHP ~8.4CI passing

Since Oct 20Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/Innmind/StackTrace)[ Packagist](https://packagist.org/packages/innmind/stack-trace)[ Docs](http://github.com/Innmind/StackTrace)[ RSS](/packages/innmind-stack-trace/feed)WikiDiscussions develop Synced 1mo ago

READMEChangelog (3)Dependencies (6)Versions (12)Used By (2)

StackTrace
==========

[](#stacktrace)

[![Build Status](https://github.com/innmind/stacktrace/workflows/CI/badge.svg?branch=master)](https://github.com/innmind/stacktrace/actions?query=workflow%3ACI)[![codecov](https://camo.githubusercontent.com/b087383689a419bf03cce85d910ae6d856d53efa66a411eb8805fc2164b41e86/68747470733a2f2f636f6465636f762e696f2f67682f696e6e6d696e642f737461636b74726163652f6272616e63682f646576656c6f702f67726170682f62616467652e737667)](https://codecov.io/gh/innmind/stacktrace)[![Type Coverage](https://camo.githubusercontent.com/0eccaf5816b66b15d8397953c2eec5ed4622363c5faa61ccac5b0ec1c7cc0620/68747470733a2f2f73686570686572642e6465762f6769746875622f696e6e6d696e642f737461636b74726163652f636f7665726167652e737667)](https://shepherd.dev/github/innmind/stacktrace)

Tool to inspect an Exception stack trace

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

[](#installation)

```
composer require innmind/stack-trace
```

Usage
-----

[](#usage)

```
use Innmind\StackTrace\{
    StackTrace,
    Render,
};
use Innmind\OperatingSystem\Factory;
use Innmind\Server\Control\Server\Command;

$trace = StackTrace::of(new AnyClassImplementingPhpThrowableInterface);

// every call frames that lead to the exception to be thrown
// (deepest call frame first)
$callFrames = $trace->throwable()->callFrames();

// this will render the stack trace via graphviz
Factory::build()
    ->control()
    ->processes()
    ->execute(
        Command::foreground('dot')
            ->withShortOption('Tsvg')
            ->withShortOption('o', 'graph.svg')
            ->withInput(
                Render::of()($trace)
            ),
    )
    ->unwrap()
    ->wait();
```

Note

The svg rendered contains links to the files where call frames and exceptions occured, you can change the link by providing an instance of [`Link`](src/Link.php) to the `Render` object.

Example of a rendered stack trace: [![](graph.svg)](graph.svg)

###  Health Score

58

—

FairBetter than 98% of packages

Maintenance81

Actively maintained with recent releases

Popularity31

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity86

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 99% 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 ~381 days

Recently: every ~455 days

Total

8

Last Release

99d ago

Major Versions

1.0.0 → 2.0.02019-01-25

2.0.0 → 3.0.02020-01-30

3.1.0 → 4.0.02022-03-27

4.2.0 → 5.0.02026-02-08

PHP version history (6 changes)1.0.0PHP ~7.2

3.0.0PHP ~7.4

3.1.0PHP ~7.4|~8.0

4.0.0PHP ~8.1

4.1.0PHP ~8.2

5.0.0PHP ~8.4

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/851425?v=4)[Baptiste Langlade](/maintainers/Baptouuuu)[@Baptouuuu](https://github.com/Baptouuuu)

---

Top Contributors

[![Baptouuuu](https://avatars.githubusercontent.com/u/851425?v=4)](https://github.com/Baptouuuu "Baptouuuu (98 commits)")[![peter279k](https://avatars.githubusercontent.com/u/9021747?v=4)](https://github.com/peter279k "peter279k (1 commits)")

---

Tags

exceptionstack traceinspect

### Embed Badge

![Health badge](/badges/innmind-stack-trace/health.svg)

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

###  Alternatives

[filp/whoops

php error handling for cool kids

13.2k402.4M1.4k](/packages/filp-whoops)[facade/flare-client-php

Send PHP errors to Flare

51899.9M4](/packages/facade-flare-client-php)[spatie/flare-client-php

Send PHP errors to Flare

177148.0M15](/packages/spatie-flare-client-php)[pear/pear_exception

The PEAR Exception base class.

9880.2M101](/packages/pear-pear-exception)[paragonie/hidden-string

Encapsulate strings in an object to hide them from stack traces

7410.6M39](/packages/paragonie-hidden-string)

PHPackages © 2026

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