damienharper / auditor
The missing audit log library.
Installs: 1 541 966
Dependents: 3
Suggesters: 0
Security: 0
Stars: 163
Watchers: 5
Forks: 53
Open Issues: 18
Requires
- php: >=8.2
- doctrine/dbal: ^3.2|^4.0
- doctrine/orm: ^2.13|^3.2
- symfony/cache: ^5.4|^6.0|^7.0
- symfony/event-dispatcher: ^5.4|^6.0|^7.0
- symfony/lock: ^5.4|^6.0|^7.0
- symfony/options-resolver: ^5.4|^6.0|^7.0
Requires (Dev)
- ext-pdo: *
- doctrine/data-fixtures: ^1.5.3
- gedmo/doctrine-extensions: ^3.0
- phpunit/phpunit: ^11.0
- symfony/var-dumper: ^5.4|^6.0|^7.0
Suggests
- damienharper/auditor-bundle: Integrate auditor library in your Symfony projects.
- dev-master / 3.x-dev
- 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-dependabot/composer/doctrine/data-fixtures-tw-1.5.3or-tw-2.0.0
This package is auto-updated.
Last update: 2024-11-19 17:49:45 UTC
README
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.
Version Information
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