dave-redfern / laravel-doctrine-entity-audit by dredfern

A port of the SimpleThings EntityAudit package re-worked for Laravel 5+
5,826
4
3
Package Data
Maintainer Username: dredfern
Maintainer Contact: eberlei@simplethings.de (Benjamin Eberlei)
Package Create Date: 2016-07-06
Package Last Update: 2022-12-19
Language: PHP
License: LGPL-2.1
Last Refreshed: 2024-04-17 15:04:41
Package Statistics
Total Downloads: 5,826
Monthly Downloads: 97
Daily Downloads: 7
Total Stars: 4
Total Watchers: 3
Total Forks: 0
Total Open Issues: 0

Entity Auditing for Doctrine in Laravel

This is a fork of the SimpleThings EntityAudit project, re-worked for usage with Laravel and the Laravel-Doctrine package. It maintains the same style of working, generating a revision for all tagged entities.

Need a Symfony based version? Check out the original SimpleThings EntityAudit.

To protect from conflicts it has been re-namespaced and some internals changed.

Installation

  • composer require somnambulist/laravel-doctrine-entity-audit
  • add the ServiceProvider to your config/app.php after the Doctrine provider
  • ./artisan vendor:publish
  • update the config file and then generate the audit tables:
    • ./artisan doctrine:migrations:diff
    • ./artisan doctrine:migrations:migrate

Unit Tests

The existing unit tests have been ported over excluding the Gedmo soft-deleteable. To run the unit tests, ensure the dev dependencies have been installed:

  • vendor/bin/phpunit

Todo

  • refactor and simplify the listener internals
  • remove any remaining deprecated Doctrine API calls

From SimpleThings:

  • currently only works with auto-increment databases
  • proper metadata mapping is necessary, allow to disable versioning for fields and associations.
  • support Joined-Table-Inheritance
  • support many-to-many auditing

Links