damienharper/doctrine-audit-bundle

Doctrine audits logs made easy.

Installs: 66 979

Dependents: 0

Suggesters: 0

Security: 0

Stars: 141

Watchers: 10

Forks: 50

Open Issues: 12

Type:symfony-bundle

3.2.3 2019-12-05 22:49 UTC

README

Latest Stable Version Latest Unstable Version Build Status License Maintainability Test Coverage Scrutinizer Code Quality
Total Downloads Monthly Downloads Daily Downloads

This bundle 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 there is an user in token storage, it is used to identify the user who made the changes.
  • audit entries are inserted within the same transaction during flush event so that even if something fails the global state remains clean.

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

NOTE: this bundle cannot track DQL or direct SQL update or delete statement executions.

You can try out this bundle by cloning its companion demo app. Follow instructions at doctrine-audit-bundle-demo.

Official Documentation

The official documentation can be found here.

Version Information

Version Status Required PHP Version
3.x Active support 🚀 >= 7.1
2.x Active support >= 7.1
1.x End of life >= 7.1

Changelog is available here

Usage

Once installed and configured, any database change affecting audited entities will be logged to audit logs automatically. Also, running schema update or similar will automatically setup audit logs for every new auditable entity.

Contributing

DoctrineAuditBundle 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

Supported DB

  • MySQL
  • MariaDB
  • PostgreSQL
  • SQLite

This bundle should work with any other database supported by Doctrine. Though, we can only really support the ones we can test with Travis CI.

Credits

License

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