PHPackages                             webware/traccio - 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. [Debugging &amp; Profiling](/categories/debugging)
4. /
5. webware/traccio

ActiveLibrary[Debugging &amp; Profiling](/categories/debugging)

webware/traccio
===============

Tracy Debugger integration and profiler for Mezzio apps.

0.1.2(3mo ago)01.3k↓81.3%1[1 issues](https://github.com/webinertia/traccio/issues)[1 PRs](https://github.com/webinertia/traccio/pulls)1BSD-3-ClausePHPPHP ~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0CI failing

Since Mar 26Pushed yesterday2 watchersCompare

[ Source](https://github.com/webinertia/traccio)[ Packagist](https://packagist.org/packages/webware/traccio)[ RSS](/packages/webware-traccio/feed)WikiDiscussions 0.1.x Synced yesterday

READMEChangelog (3)Dependencies (27)Versions (10)Used By (1)

Webware\\Traccio
================

[](#webwaretraccio)

Tracy Debugger integration and profiler for [Mezzio](https://docs.mezzio.dev/) applications.

Traccio wires [Tracy](https://tracy.nette.org/) into a Mezzio middleware pipeline and provides purpose-built debug bar panels for configuration, routes, HTTP requests, and SQL query profiling.

---

Requirements
------------

[](#requirements)

RequirementVersionPHP`~8.2 || ~8.3 || ~8.4 || ~8.5`tracy/tracy`^2.11`mezzio/mezzio`^3.26` *(dev / host app)*Database profiling additionally requires a [PhpDb](https://github.com/php-db) adapter and the `php-db/phpdb` package.

---

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

[](#installation)

```
composer require webware/traccio
```

If you are using the [laminas-component-installer](https://docs.laminas.dev/laminas-component-installer/) plugin it will prompt you to inject the `ConfigProvider` automatically. Otherwise add it manually (see [Configuration](#configuration)).

---

Configuration
-------------

[](#configuration)

### 1. Register the ConfigProvider

[](#1-register-the-configprovider)

Add `Webware\Traccio\ConfigProvider` to your application's config aggregator:

```
// config/config.php
use Laminas\ConfigAggregator\ConfigAggregator;
use Webware\Traccio\ConfigProvider;

$aggregator = new ConfigAggregator([
    ConfigProvider::class,
    // ... other providers
]);
```

### 2. Tracy settings

[](#2-tracy-settings)

Create `config/autoload/tracy.global.php` (or add to an existing autoload file):

```
use Tracy\Debugger;

return [
    'debug' => true,

    Debugger::class => [
        'dumpTheme'  => 'dark',   // 'light' or 'dark'
        'keysToHide' => [
            'password',
            'pass',
            'secret',
        ],
        // Any public static property of Tracy\Debugger can be set here.
        // 'maxDepth'     => 10,
        // 'maxLength'    => 250,
        // 'showLocation' => true,
    ],
];
```

Set `'debug' => true` or enable Mezzio development mode in config.

---

Middleware pipeline
-------------------

[](#middleware-pipeline)

Add the two middleware classes to your pipeline. `TracyDebuggerMiddleware` should come early so it initialises Tracy before your application logic runs. `RequestPanelMiddleware` should be placed **very late** in the pipeline so the final state of the Request is reflected in the panel (this is not required for Traccio to work).

```
// config/pipeline.php
use Webware\Traccio\Middleware\RequestPanelMiddleware;
use Webware\Traccio\Middleware\TracyDebuggerMiddleware;

$app->pipe(TracyDebuggerMiddleware::class);

// ... error handler, routing, ...

$app->pipe(RequestPanelMiddleware::class);
```

---

Debug panels
------------

[](#debug-panels)

All panels are registered automatically when their dependencies are available in the container. No extra wiring is needed beyond the steps above.

PanelTracy bar labelShows`ConfigPanel`ConfigFull application config array`RoutesPanel`RoutesAll registered Mezzio routes`RequestPanel`RequestPSR-7 request headers, method, URI, body`SqlProfilerPanel`DatabaseSQL query groups, timings, parameters### SQL Profiler panel

[](#sql-profiler-panel)

The database panel groups identical queries together and displays:

- **Summary bar** — total queries, unique statements, total elapsed, slowest single query (all in ms)
- **Per-group cards** — execution count badge, SQL text, total / average timing
- **Per-execution rows** — wall-clock start time (`H:i:s.mmm`), elapsed ms, bound parameters

Parameter tokens reflect the style used in the original query:

Parameter styleDisplayed tokenPositional `?` (stored as `"0"`, `"1"`, …)`?1`, `?2`, …Named (stored as `"C_1"`, `"name"`, …)`:C_1`, `:name`#### Enabling database profiling

[](#enabling-database-profiling)

Database profiling requires:

1. A PhpDb adapter registered in the container as `PhpDb\Adapter\AdapterInterface`.
2. The `ProfilingDelegator` wrapping that adapter to attach a `Profiler` instance.

Enable the delegator in your application's config (it is commented out in `ConfigProvider` by default):

```
// config/autoload/development.local.php
use PhpDb\Adapter\AdapterInterface;
use Webware\Traccio\PhpDb\ProfilingDelegator;

return [
    'dependencies' => [
        'delegators' => [
            AdapterInterface::class => [
                ProfilingDelegator::class,
            ],
        ],
    ],
];
```

Once the delegator is active, the SQL panel will appear in the Tracy bar automatically whenever `debug` is `true`.

---

License
-------

[](#license)

BSD-3-Clause — see [LICENSE](LICENSE) for details.

###  Health Score

45

—

FairBetter than 91% of packages

Maintenance92

Actively maintained with recent releases

Popularity19

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 95.1% 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 ~1 days

Total

4

Last Release

95d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4d6eed33e61a99f1147789696252f4523130b5035a19eb07e034a7407fd44548?d=identicon)[tyrsson](/maintainers/tyrsson)

---

Top Contributors

[![tyrsson](https://avatars.githubusercontent.com/u/1237487?v=4)](https://github.com/tyrsson "tyrsson (98 commits)")[![halldorr](https://avatars.githubusercontent.com/u/474547?v=4)](https://github.com/halldorr "halldorr (5 commits)")

---

Tags

webwarewebware traccio

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[recca0120/laravel-tracy

A Laravel Package to integrate Nette Tracy Debugger

388284.8k3](/packages/recca0120-laravel-tracy)[contributte/tracy

Nette Tracy extensions for easy-developing

141.5M5](/packages/contributte-tracy)[milo/vendor-versions

Bar with versions list of vendor libraries for Tracy

19159.2k5](/packages/milo-vendor-versions)[vasek-purchart/tracy-blue-screen-bundle

This bundle lets you use the Tracy's debug screen in combination with the the default profiler in your Symfony application.

1178.4k](/packages/vasek-purchart-tracy-blue-screen-bundle)[orisai/tracy-pets

Tracy got an angry pet to remind you of your failures

1026.3k4](/packages/orisai-tracy-pets)

PHPackages © 2026

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