PHPackages                             antonmarin/traceable-pdo - 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. antonmarin/traceable-pdo

AbandonedArchivedLibrary[Database &amp; ORM](/categories/database)

antonmarin/traceable-pdo
========================

Wrapper for PDO that adds trace of statement source to analyze slow SQL statements in real-time

2.1.0(6y ago)11.1kGPL-3.0PHPPHP ^5.6 || ^7.0

Since Jan 22Pushed 5y ago1 watchersCompare

[ Source](https://github.com/antonmarin/traceable-pdo)[ Packagist](https://packagist.org/packages/antonmarin/traceable-pdo)[ RSS](/packages/antonmarin-traceable-pdo/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (3)Dependencies (2)Versions (5)Used By (0)

traceable-pdo
=============

[](#traceable-pdo)

Adds trace to your sql statement

[![Build Status](https://camo.githubusercontent.com/573f85359caf0919d1744d6ac6dde1f0ead3291c88f016d130866ce54960b313/68747470733a2f2f7472617669732d63692e6f72672f616e746f6e6d6172696e2f747261636561626c652d70646f2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/antonmarin/traceable-pdo)[![Latest Stable Version](https://camo.githubusercontent.com/d17edd5c5ca9fd83057970b426be5bc0a432067e9059cd828200c9939f932e21/68747470733a2f2f706f7365722e707567782e6f72672f616e746f6e6d6172696e2f747261636561626c652d70646f2f762f737461626c65)](https://packagist.org/packages/antonmarin/traceable-pdo)[![License](https://camo.githubusercontent.com/57c39bd2f39a50853363b616fce47a9223e6b2f33807dde1858815e09c88ea3c/68747470733a2f2f706f7365722e707567782e6f72672f616e746f6e6d6172696e2f747261636561626c652d70646f2f6c6963656e7365)](https://packagist.org/packages/antonmarin/traceable-pdo)

[![Code Climate](https://camo.githubusercontent.com/e504ccb3bc36415873eccab672e3ce8e89c7527e0918e9947bc64ce773d4a5aa/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f616e746f6e6d6172696e2f747261636561626c652d70646f2f6261646765732f6770612e737667)](https://codeclimate.com/github/antonmarin/traceable-pdo)[![Test Coverage](https://camo.githubusercontent.com/5fd570507dbda8ca4510befad600358aefb6cf33e2d992112386b3c27c763cd1/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f616e746f6e6d6172696e2f747261636561626c652d70646f2f6261646765732f636f7665726167652e737667)](https://codeclimate.com/github/antonmarin/traceable-pdo/coverage)[![Total Downloads](https://camo.githubusercontent.com/22562317f9275b0b00dd7a7d95be492e3b8325ceafe2e155e893fd2cbf4243f4/68747470733a2f2f706f7365722e707567782e6f72672f616e746f6e6d6172696e2f747261636561626c652d70646f2f646f776e6c6f616473)](https://packagist.org/packages/antonmarin/traceable-pdo)

Usage
-----

[](#usage)

When you use `traceablePDO\PDO` your statement looks like `SELECT 1 /* eJxT0NdSKM7PTVUoKUpMTlUoLinKzEtX0NIHAF05B60= */`so to get trace you should just enter in your terminal `php -r 'echo gzuncompress(base64_decode("eJxT0NdSKM7PTVUoKUpMTlUoLinKzEtX0NIHAF05B60="));'`

Examples
--------

[](#examples)

### Yii2

[](#yii2)

config/main.php

```
...
    'db' => [
        'class' => yii\db\Connection::class,
        'dsn' => 'mysql:host=localhost;dbname=stay2',
        'username' => 'root',
        'password' => 'pass',
        'charset' => 'utf8',
        'pdoClass' => antonmarin\TraceablePDO\PDO::class, // this line adds traces
    ],
...
```

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 96.4% 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 ~357 days

Total

4

Last Release

2373d ago

Major Versions

v1.0.0 → v2.x-dev2019-12-01

PHP version history (2 changes)v1.0.0PHP &gt;=5.3

v2.x-devPHP ^5.6 || ^7.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/6785490?v=4)[Anton Marin](/maintainers/antonmarin)[@antonmarin](https://github.com/antonmarin)

---

Top Contributors

[![antonmarin](https://avatars.githubusercontent.com/u/6785490?v=4)](https://github.com/antonmarin "antonmarin (54 commits)")[![dependabot-preview[bot]](https://avatars.githubusercontent.com/in/2141?v=4)](https://github.com/dependabot-preview[bot] "dependabot-preview[bot] (2 commits)")

---

Tags

debugpdosqltracesqlpdotrace

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/antonmarin-traceable-pdo/health.svg)

```
[![Health](https://phpackages.com/badges/antonmarin-traceable-pdo/health.svg)](https://phpackages.com/packages/antonmarin-traceable-pdo)
```

###  Alternatives

[doctrine/dbal

Powerful PHP database abstraction layer (DBAL) with many features for database schema introspection and management.

9.7k595.8M6.5k](/packages/doctrine-dbal)[ifsnop/mysqldump-php

PHP version of mysqldump cli that comes with MySQL

1.3k5.8M75](/packages/ifsnop-mysqldump-php)[aura/sqlquery

Object-oriented query builders for MySQL, Postgres, SQLite, and SQLServer; can be used with any database connection library.

4563.1M37](/packages/aura-sqlquery)[paragonie/easydb

Easy-to-use database abstraction

734280.1k24](/packages/paragonie-easydb)[clouddueling/mysqldump-php

PHP version of mysqldump cli that comes with MySQL

1.3k23.1k](/packages/clouddueling-mysqldump-php)[ezsql/ezsql

Advance database access library. Make interacting with a database ridiculously easy. An universal interchangeable CRUD system.

86748.3k](/packages/ezsql-ezsql)

PHPackages © 2026

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