damienharper/auditor
The missing audit log library.
Maintainers
Requires
- php: >=8.4
- symfony/event-dispatcher: ^8.0
- symfony/options-resolver: ^8.0
Requires (Dev)
- ext-pdo: *
- doctrine/data-fixtures: ^2.0
- doctrine/dbal: ^4.0
- doctrine/orm: ^3.2
- gedmo/doctrine-extensions: ^3.0
- phpbench/phpbench: ^1.4
- phpunit/phpunit: ^12.0
- symfony/cache: ^8.0
- symfony/flex: ^2.4
- symfony/lock: ^8.0
- symfony/var-dumper: ^8.0
Suggests
- damienharper/auditor-bundle: Integrate auditor library in your Symfony projects.
- damienharper/auditor-doctrine-provider: Doctrine ORM audit provider (extracted from auditor core, replaces built-in DoctrineProvider).
Provides
None
Conflicts
None
Replaces
None
MIT 089fcd22b9d84f94246af0a2cb5501563a33b3b4
- Damien Harper <damien.harper.woop@gmail.com>
This package is auto-updated.
Last update: 2026-06-08 00:04:50 UTC
README
👁 Latest Stable Version
👁 Latest Unstable Version
👁 auditor 4.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.
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
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.
Basically you can track any change of any entity from audit logs.
NOTE: DoctrineProvider cannot track DQL or direct SQL statements executions.
Official Documentation
auditor official documentation can be found here or locally in the docs/ folder.
Version Information
| Version | Status | Requirements | Badges |
|---|---|---|---|
| 4.x | Active development 🚀 | PHP >= 8.4, Symfony >= 8.0, Doctrine DBAL >= 4.0, Doctrine ORM >= 3.2 | 👁 auditor 4.x CI 👁 Scrutinizer Code Quality 👁 codecov |
| 3.x | Active support | PHP >= 8.2, Symfony >= 5.4 | 👁 auditor 3.x CI 👁 Scrutinizer Code Quality 👁 codecov |
| 2.x | EOL | PHP >= 7.4, Symfony >= 4.4 | 👁 auditor 2.x CI 👁 Scrutinizer Code Quality 👁 codecov |
| 1.x | EOL | PHP >= 7.2, Symfony >= 3.4 | 👁 auditor 1.x CI 👁 Scrutinizer Code Quality 👁 codecov |
Changelog is available here
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
