PHPackages                             damienharper/auditor - 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. damienharper/auditor

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

damienharper/auditor
====================

The missing audit log library.

4.3.1(1mo ago)1922.8M↓16.8%67[10 issues](https://github.com/DamienHarper/auditor/issues)5MITPHPPHP &gt;=8.4CI passing

Since Dec 6Pushed 1mo ago3 watchersCompare

[ Source](https://github.com/DamienHarper/auditor)[ Packagist](https://packagist.org/packages/damienharper/auditor)[ RSS](/packages/damienharper-auditor/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (24)Versions (54)Used By (5)

auditor [![Tweet](https://camo.githubusercontent.com/cb820a0ecc9645168e33b03925d7f14691262ddbaeaf66a0a91697803d0cba2d/68747470733a2f2f696d672e736869656c64732e696f2f747769747465722f75726c2f687474702f736869656c64732e696f2e7376673f7374796c653d736f6369616c)](https://twitter.com/intent/tweet?text=auditor,%20the%20missing%20audit%20log%20library.&url=https://github.com/DamienHarper/auditor&hashtags=auditor)
====================================================================================================================================================================================================================================================================================================================================================================================================================

[](#auditor-)

[![Latest Stable Version](https://camo.githubusercontent.com/40f3c4f2153873306a1eb643e0aa3350c396b0a9e39176e6db821b9146507251/68747470733a2f2f706f7365722e707567782e6f72672f64616d69656e6861727065722f61756469746f722f762f737461626c65)](https://packagist.org/packages/damienharper/auditor)[![Latest Unstable Version](https://camo.githubusercontent.com/7aef1b3f427de0708fa7ab33d9d4783daabfde3b65a9d36b180fe7ab34feb4fa/68747470733a2f2f706f7365722e707567782e6f72672f64616d69656e6861727065722f61756469746f722f762f756e737461626c65)](https://packagist.org/packages/damienharper/auditor)[![auditor 4.x CI](https://github.com/DamienHarper/auditor/actions/workflows/ci-4.x.yml/badge.svg)](https://github.com/DamienHarper/auditor/actions/workflows/ci-4.x.yml)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/bc84837855c3fccfbef2ef81e67f286c44c1aa4841c9cf315a6bd8227e3737e6/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f44616d69656e4861727065722f61756469746f722f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/DamienHarper/auditor/?branch=master)[![codecov](https://camo.githubusercontent.com/08758ea03c7856753d13f2a8852f85d30a6cbf0100153ba2cb89e43bf5a8c850/68747470733a2f2f636f6465636f762e696f2f67682f44616d69656e4861727065722f61756469746f722f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://app.codecov.io/gh/DamienHarper/auditor/branch/master)[![License](https://camo.githubusercontent.com/888556dd07c1f2252436d65b379d10b3e39f2db8619b9bd98fca4c48065d177b/68747470733a2f2f706f7365722e707567782e6f72672f64616d69656e6861727065722f61756469746f722f6c6963656e7365)](https://packagist.org/packages/damienharper/auditor)[![Total Downloads](https://camo.githubusercontent.com/fc939f071060d68a9e81dbab5404b5db16e93b2e798564b4c34356d1f4a300c9/68747470733a2f2f706f7365722e707567782e6f72672f64616d69656e6861727065722f61756469746f722f646f776e6c6f616473)](https://packagist.org/packages/damienharper/auditor)[![Monthly Downloads](https://camo.githubusercontent.com/8f5f47a1a3307859fc2fe0ee8f4bb5cd8802d13cbc11587889a72d4be351c57e/68747470733a2f2f706f7365722e707567782e6f72672f64616d69656e6861727065722f61756469746f722f642f6d6f6e74686c79)](https://packagist.org/packages/damienharper/auditor)[![Daily Downloads](https://camo.githubusercontent.com/9393a0b58203d4560a7d975ea7baec5fa30729f1422a7010d1c5cd8c92073e38/68747470733a2f2f706f7365722e707567782e6f72672f64616d69656e6861727065722f61756469746f722f642f6461696c79)](https://packagist.org/packages/damienharper/auditor)

The purpose of `auditor` is to provide an easy and standardized way to collect audit logs.

Architecture
------------

[](#architecture)

This library is architected around two concepts:

- Auditing services responsible for collecting audit events
- Storage services responsible for persisting audit traces

Those two kind of services are offered by Providers.

Default provider
----------------

[](#default-provider)

A default provider is included with this library: the `DoctrineProvider`

`DoctrineProvider` offers both auditing services and sorage services. It creates audit logs for all `Doctrine ORM` database related changes:

- inserts and updates including their diffs and relation field diffs.
- many to many relation changes, association and dissociation actions.
- if available, the user responsible for these changes and his IP address are recorded.
- audit entries are inserted within the same transaction during **flush** event so that even if something fails the global state remains clean.

`DoctrineProvider` supports following RDBMS

- MySQL
- MariaDB
- PostgreSQL
- SQLite

`DoctrineProvider` should work with **any other** database supported by `Doctrine`. Though, we can only really support the ones we can test with [GitHub Actions](https://github.com/features/actions).

Basically you can track any change of any entity from audit logs.

**NOTE:** `DoctrineProvider` cannot track DQL or direct SQL statements executions.

Official Documentation
----------------------

[](#official-documentation)

`auditor` official documentation can be found [here](https://damienharper.github.io/auditor-docs/) or locally in the [docs/](docs/) folder.

Version Information
-------------------

[](#version-information)

VersionStatusRequirementsBadges4.xActive development 🚀PHP &gt;= 8.4, Symfony &gt;= 8.0, Doctrine DBAL &gt;= 4.0, Doctrine ORM &gt;= 3.2[![auditor 4.x CI](https://github.com/DamienHarper/auditor/actions/workflows/ci-4.x.yml/badge.svg)](https://github.com/DamienHarper/auditor/actions/workflows/ci-4.x.yml)
[![Scrutinizer Code Quality](https://camo.githubusercontent.com/bc84837855c3fccfbef2ef81e67f286c44c1aa4841c9cf315a6bd8227e3737e6/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f44616d69656e4861727065722f61756469746f722f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/DamienHarper/auditor/?branch=master)
[![codecov](https://camo.githubusercontent.com/08758ea03c7856753d13f2a8852f85d30a6cbf0100153ba2cb89e43bf5a8c850/68747470733a2f2f636f6465636f762e696f2f67682f44616d69656e4861727065722f61756469746f722f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://app.codecov.io/gh/DamienHarper/auditor/branch/master)3.xActive supportPHP &gt;= 8.2, Symfony &gt;= 5.4[![auditor 3.x CI](https://github.com/DamienHarper/auditor/actions/workflows/ci-3.x.yml/badge.svg)](https://github.com/DamienHarper/auditor/actions/workflows/ci-3.x.yml)
[![Scrutinizer Code Quality](https://camo.githubusercontent.com/2daef8da9f7b3abbd98582d8e7e85144d1333ddc0dd26875bb33ee64d1425677/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f44616d69656e4861727065722f61756469746f722f6261646765732f7175616c6974792d73636f72652e706e673f623d332e78)](https://scrutinizer-ci.com/g/DamienHarper/auditor/?branch=3.x)
[![codecov](https://camo.githubusercontent.com/22b5d68070ea777afc9678ea90d4775c7e4f96fdff2b71a619d5ecd47e4ed915/68747470733a2f2f636f6465636f762e696f2f67682f44616d69656e4861727065722f61756469746f722f6272616e63682f332e782f67726170682f62616467652e737667)](https://app.codecov.io/gh/DamienHarper/auditor/branch/3.x)2.xEOLPHP &gt;= 7.4, Symfony &gt;= 4.4[![auditor 2.x CI](https://github.com/DamienHarper/auditor/actions/workflows/ci-2.x.yml/badge.svg)](https://github.com/DamienHarper/auditor/actions/workflows/ci-2.x.yml)
[![Scrutinizer Code Quality](https://camo.githubusercontent.com/b76a9aedefef0f1e19363da69b4bde03f52c31be056d0fb139741dc0a42dd19d/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f44616d69656e4861727065722f61756469746f722f6261646765732f7175616c6974792d73636f72652e706e673f623d322e78)](https://scrutinizer-ci.com/g/DamienHarper/auditor/?branch=2.x)
[![codecov](https://camo.githubusercontent.com/08758ea03c7856753d13f2a8852f85d30a6cbf0100153ba2cb89e43bf5a8c850/68747470733a2f2f636f6465636f762e696f2f67682f44616d69656e4861727065722f61756469746f722f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://app.codecov.io/gh/DamienHarper/auditor/branch/2.x)1.xEOLPHP &gt;= 7.2, Symfony &gt;= 3.4[![auditor 1.x CI](https://github.com/DamienHarper/auditor/actions/workflows/ci-1.x.yml/badge.svg)](https://github.com/DamienHarper/auditor/actions/workflows/ci-1.x.yml)
[![Scrutinizer Code Quality](https://camo.githubusercontent.com/2d4bc8d715426da26b777adfd2f0e78f12fba557b24734f997b185a6f7351f8f/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f44616d69656e4861727065722f61756469746f722f6261646765732f7175616c6974792d73636f72652e706e673f623d312e78)](https://scrutinizer-ci.com/g/DamienHarper/auditor/?branch=1.x)
[![codecov](https://camo.githubusercontent.com/aa8966b4cb52e2210aeda8ce331d27c58cf8f43cb0b2af89e871fd77082a1b3e/68747470733a2f2f636f6465636f762e696f2f67682f44616d69656e4861727065722f61756469746f722f6272616e63682f312e782f67726170682f62616467652e737667)](https://app.codecov.io/gh/DamienHarper/auditor/branch/1.x)Changelog is available [here](https://damienharper.github.io/auditor-docs/docs/auditor/release-notes.html)

Contributing
------------

[](#contributing)

`auditor` is an open source project. Contributions made by the community are welcome. Send us your ideas, code reviews, pull requests and feature requests to help us improve this project.

Do not forget to provide unit tests when contributing to this project. To do so, follow instructions in this dedicated [README](tests/README.md)

Credits
-------

[](#credits)

- Thanks to [all contributors](https://github.com/DamienHarper/auditor/graphs/contributors)
- This library initially took some inspiration from [data-dog/audit-bundle](https://github.com/DATA-DOG/DataDogAuditBundle.git) and [simplethings/entity-audit-bundle](https://github.com/simplethings/EntityAuditBundle.git)
- Special thanks to [JetBrains](https://www.jetbrains.com/?from=auditor) for their *Licenses for Open Source Development*

License
-------

[](#license)

`auditor` is free to use and is licensed under the [MIT license](http://www.opensource.org/licenses/mit-license.php)

###  Health Score

71

—

ExcellentBetter than 100% of packages

Maintenance89

Actively maintained with recent releases

Popularity62

Solid adoption and visibility

Community35

Small or concentrated contributor base

Maturity84

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 81% 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 ~40 days

Recently: every ~3 days

Total

49

Last Release

55d ago

Major Versions

1.4.0 → 2.0.02022-03-05

2.4.8 → 3.0.02024-09-10

1.x-dev → 3.4.02026-02-07

2.x-dev → 3.x-dev2026-02-13

3.x-dev → 4.0.02026-02-19

PHP version history (4 changes)1.0.0PHP &gt;=7.2

2.0.0PHP &gt;=7.4

3.0.0PHP &gt;=8.2

4.0.0PHP &gt;=8.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/51d7d2e14d685754ebe0490660d2a99fe77facd81a66e981bee164b7a250bdab?d=identicon)[damien.harper](/maintainers/damien.harper)

---

Top Contributors

[![DamienHarper](https://avatars.githubusercontent.com/u/2448660?v=4)](https://github.com/DamienHarper "DamienHarper (286 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (23 commits)")[![dmitryuk](https://avatars.githubusercontent.com/u/661654?v=4)](https://github.com/dmitryuk "dmitryuk (14 commits)")[![janklan](https://avatars.githubusercontent.com/u/5463371?v=4)](https://github.com/janklan "janklan (4 commits)")[![samuel4x4](https://avatars.githubusercontent.com/u/3427855?v=4)](https://github.com/samuel4x4 "samuel4x4 (3 commits)")[![joerndyherrn](https://avatars.githubusercontent.com/u/5102468?v=4)](https://github.com/joerndyherrn "joerndyherrn (3 commits)")[![yivi](https://avatars.githubusercontent.com/u/1815039?v=4)](https://github.com/yivi "yivi (2 commits)")[![oleg-andreyev](https://avatars.githubusercontent.com/u/1244112?v=4)](https://github.com/oleg-andreyev "oleg-andreyev (2 commits)")[![Metabor](https://avatars.githubusercontent.com/u/2135064?v=4)](https://github.com/Metabor "Metabor (1 commits)")[![NH-JZ](https://avatars.githubusercontent.com/u/181482142?v=4)](https://github.com/NH-JZ "NH-JZ (1 commits)")[![noisesfromspace](https://avatars.githubusercontent.com/u/2955898?v=4)](https://github.com/noisesfromspace "noisesfromspace (1 commits)")[![remyroussel](https://avatars.githubusercontent.com/u/53840091?v=4)](https://github.com/remyroussel "remyroussel (1 commits)")[![robier](https://avatars.githubusercontent.com/u/3607521?v=4)](https://github.com/robier "robier (1 commits)")[![RomanApunts](https://avatars.githubusercontent.com/u/62882223?v=4)](https://github.com/RomanApunts "RomanApunts (1 commits)")[![SanderVerkuil](https://avatars.githubusercontent.com/u/7080527?v=4)](https://github.com/SanderVerkuil "SanderVerkuil (1 commits)")[![vindert](https://avatars.githubusercontent.com/u/17656771?v=4)](https://github.com/vindert "vindert (1 commits)")[![martijnboers](https://avatars.githubusercontent.com/u/2955898?v=4)](https://github.com/martijnboers "martijnboers (1 commits)")[![dbannik](https://avatars.githubusercontent.com/u/16108701?v=4)](https://github.com/dbannik "dbannik (1 commits)")[![djpremier](https://avatars.githubusercontent.com/u/17091381?v=4)](https://github.com/djpremier "djpremier (1 commits)")[![gassan](https://avatars.githubusercontent.com/u/2382015?v=4)](https://github.com/gassan "gassan (1 commits)")

---

Tags

audit-bundleaudit-logaudit-logsaudit-trailauditing-servicesauditorauditsdiffsdoctrinedoctrine-auditdoctrine2ormdoctrineAuditaudit-trailaudit-log

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/damienharper-auditor/health.svg)

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

###  Alternatives

[damienharper/auditor-bundle

Integrate auditor library in your Symfony projects.

4542.8M](/packages/damienharper-auditor-bundle)[laravel-doctrine/orm

An integration library for Laravel and Doctrine ORM

8425.3M87](/packages/laravel-doctrine-orm)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)[scienta/doctrine-json-functions

A set of extensions to Doctrine that add support for json query functions.

58723.9M36](/packages/scienta-doctrine-json-functions)[ec-cube/ec-cube

EC-CUBE EC open platform.

78527.0k1](/packages/ec-cube-ec-cube)

PHPackages © 2026

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