damienharper / auditor
Provider-agnostic PHP audit log library: records who changed what and when through pluggable auditing and storage providers.
Requires
- php: >=8.4
- symfony/event-dispatcher: ^8.1
- symfony/options-resolver: ^8.1
- symfony/uid: ^8.1
Requires (Dev)
- ext-pdo: *
- phpunit/phpunit: ^13.4
- symfony/flex: ^2.4
- symfony/var-dumper: ^8.1
Suggests
- damienharper/auditor-bundle: Integrate auditor library in your Symfony projects.
Provides
None
Conflicts
None
Replaces
None
- dev-master / 5.x-dev
- 5.0.0
- 4.x-dev
- 4.4.0
- 4.3.1
- 4.3.0
- 4.2.0
- 4.1.0
- 4.0.0
- 3.x-dev
- 3.4.0
- 3.3.4
- 3.3.3
- 3.3.2
- 3.3.1
- 3.3.0
- 3.2.0
- 3.1.0
- 3.0.1
- 3.0.0
- 2.x-dev
- 2.4.8
- 2.4.7
- 2.4.6
- 2.4.5
- 2.4.4
- 2.4.3
- 2.4.2
- 2.4.1
- 2.4.0
- 2.3.2
- 2.3.1
- 2.3.0
- 2.2.1
- 2.2.0
- 2.1.1
- 2.1.0
- 2.0.5
- 2.0.4
- 2.0.3
- 2.0.2
- 2.0.1
- 2.0.0
- 1.x-dev
- 1.4.0
- 1.3.2
- 1.3.1
- 1.3.0
- 1.2.0
- 1.1.0
- 1.0.1
- 1.0.0
- dev-ci/drop-unsupported-nightly
- dev-claude/project-thread-x75uec
This package is auto-updated.
Last update: 2026-12-01 13:13:13 UTC
README
The purpose of auditor is to provide an easy and standardized way to collect audit logs:
who changed what, when, and how. It is the core of the auditor family: it defines the contracts
and the audit entry model, and providers do the change tracking and the storage.
Which package do I need?
| Your application | Install | Brings |
|---|---|---|
| Symfony with Doctrine ORM | composer require damienharper/auditor-bundle |
auditor + Doctrine provider + configuration + viewer |
| Doctrine ORM without Symfony | composer require damienharper/auditor-doctrine-provider |
auditor + Doctrine provider |
| Another persistence layer | composer require damienharper/auditor |
the core only: write your own provider |
| Line | auditor | auditor-doctrine-provider | auditor-bundle | Status |
|---|---|---|---|---|
| Next | 5.x | 2.x | 8.x | Active development |
| Latest stable | 4.x | 1.x | 7.x | Maintained |
Since auditor 5.0 the Doctrine provider is no longer part of this package: it lives in
auditor-doctrine-provider (in 4.x it is still bundled, deprecated). auditor-bundle was formerly
known as DoctrineAuditBundle. See the upgrade guides.
Using an AI coding agent?
Each package ships an Agent Skill in its skills/ folder (vendor/damienharper/*/skills/
once installed) describing its API. The copy in vendor/ matches your installed version; the marketplace serves the current major. With Claude Code:
/plugin marketplace add DamienHarper/auditor
/plugin install auditor-bundle@auditor
The documentation is also available as llms.txt.
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.
Providers
The Doctrine ORM provider lives in its own package,
auditor-doctrine-provider. It creates audit logs for
all Doctrine ORM database related changes:
- inserts, updates and removals, including their diffs and relation field diffs;
- many-to-many relation changes, association and dissociation actions;
- if available, the user responsible for these changes, their IP address and how the change was made (blame context);
- audit entries are written within the same database transaction as the changes, so that even if something fails the global state remains clean.
It supports MySQL, MariaDB, PostgreSQL and SQLite. Symfony applications use
auditor-bundle, which also ships a web viewer.
You can also build your own provider.
Official Documentation
auditor official documentation can be found here or locally in the docs/ folder.
Version Information
Changelog is available in the releases, and the upgrade guides in UPGRADE-5.0.md and the documentation.
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
Credits
- Thanks to all contributors
- This library initially took some inspiration from data-dog/audit-bundle and simplethings/entity-audit-bundle
- Special thanks to JetBrains for their Licenses for Open Source Development
License
auditor is free to use and is licensed under the MIT license