Search by

damienharper / auditor

damien.harper

Provider-agnostic PHP audit log library: records who changed what and when through pluggable auditing and storage providers.

Package info

github.com/DamienHarper/auditor

Homepage

Documentation

pkg:composer/damienharper/auditor

Statistics

Installs: 3 804 234

Dependents: 5

Suggesters: 0

Stars: 203

Open Issues: 1

5.0.0 2026-11-27 21:43 UTC

README

Latest Stable Version Latest Unstable Version auditor 5.x CI Scrutinizer Code Quality codecov License Total Downloads Monthly Downloads Daily Downloads

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

Version Status Requirements Badges
5.x Active development 🚀 PHP >= 8.4, Symfony >= 8.1 auditor 5.x CI
Scrutinizer Code Quality
codecov
4.x Bug and security fixes PHP >= 8.4, Symfony >= 8.1, Doctrine DBAL >= 4.0, Doctrine ORM >= 3.2 auditor 4.x CI
Scrutinizer Code Quality
codecov
3.x End of Life PHP >= 8.2, Symfony >= 5.4 Scrutinizer Code Quality
codecov
2.x EOL PHP >= 7.4, Symfony >= 4.4 Scrutinizer Code Quality
codecov
1.x EOL PHP >= 7.2, Symfony >= 3.4 Scrutinizer Code Quality
codecov

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

License

auditor is free to use and is licensed under the MIT license