PHPackages                             terwey/doctrine-stack-bundle - 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. [Database &amp; ORM](/categories/database)
4. /
5. terwey/doctrine-stack-bundle

ActiveSymfony-bundle[Database &amp; ORM](/categories/database)

terwey/doctrine-stack-bundle
============================

Symfony DoctrineBundle extension with a Stacktrace per Query

068PHP

Since May 27Pushed 11y ago1 watchersCompare

[ Source](https://github.com/terwey/DoctrineStackBundle)[ Packagist](https://packagist.org/packages/terwey/doctrine-stack-bundle)[ RSS](/packages/terwey-doctrine-stack-bundle/feed)WikiDiscussions master Synced 6d ago

READMEChangelogDependenciesVersions (1)Used By (0)

DoctrineStackBundle
===================

[](#doctrinestackbundle)

Symfony DoctrineBundle extension with a Stacktrace per Query

Require in composer.json
========================

[](#require-in-composerjson)

```
"terwey/doctrine-stack-bundle": "dev-master"

```

Register with your AppKernel
============================

[](#register-with-your-appkernel)

```
if (in_array($this->getEnvironment(), array('dev', 'test'))) {
			$bundles[] = new Terwey\DoctrineStackBundle\DoctrineStackBundle();
}

```

WARNING
=======

[](#warning)

I currently can't figure out how to get it to properly work from a Bundle so you'll have to replace this file locally: `vendor/doctrine/dbal/lib/Doctrine/DBAL/Logging/DebugStack.php`

Change this line:

```
$this->queries[++$this->currentQuery] = array('sql' => $sql, 'params' => $params, 'types' => $types, 'executionMS' => 0);

```

To this line:

```
$e = new \Exception;
$shortTrace = explode("\n", $e->getTraceAsString())[5];
$this->queries[++$this->currentQuery] = array('sql' => $sql, 'params' => $params, 'types' => $types, 'executionMS' => 0, 'stacktrace' => $e->getTraceAsString(), 'shortstack' => $shortTrace);

```

If you happen to know how to do this properly, please make a PR!

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

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/8cac999bef96a7cfd9aeffcdcb282aa6116a4444ce8e2ca8241be075ad964a6f?d=identicon)[terwey](/maintainers/terwey)

---

Top Contributors

[![terwey](https://avatars.githubusercontent.com/u/1596124?v=4)](https://github.com/terwey "terwey (6 commits)")

### Embed Badge

![Health badge](/badges/terwey-doctrine-stack-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/terwey-doctrine-stack-bundle/health.svg)](https://phpackages.com/packages/terwey-doctrine-stack-bundle)
```

###  Alternatives

[doctrine/orm

Object-Relational-Mapper for PHP

10.2k285.3M6.2k](/packages/doctrine-orm)[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k115.1M102](/packages/jdorn-sql-formatter)[illuminate/database

The Illuminate Database package.

2.8k52.4M9.4k](/packages/illuminate-database)[mongodb/mongodb

MongoDB driver library

1.6k64.0M546](/packages/mongodb-mongodb)[ramsey/uuid-doctrine

Use ramsey/uuid as a Doctrine field type.

90340.3M211](/packages/ramsey-uuid-doctrine)[reliese/laravel

Reliese Components for Laravel Framework code generation.

1.7k3.4M16](/packages/reliese-laravel)

PHPackages © 2026

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