PHPackages                             kricha/doctrine-audit-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. kricha/doctrine-audit-bundle

ActiveSymfony-bundle[Database &amp; ORM](/categories/database)

kricha/doctrine-audit-bundle
============================

This bundle creates audit logs for all doctrine ORM database related changes.

0.3.12(4y ago)94.2k2[1 PRs](https://github.com/kricha/DoctrineAuditBundle/pulls)MITPHPPHP ^8

Since Jul 27Pushed 4y ago1 watchersCompare

[ Source](https://github.com/kricha/DoctrineAuditBundle)[ Packagist](https://packagist.org/packages/kricha/doctrine-audit-bundle)[ RSS](/packages/kricha-doctrine-audit-bundle/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (10)Dependencies (5)Versions (28)Used By (0)

DoctrineAuditBundle
===================

[](#doctrineauditbundle)

Inspired by

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.
- the audit entries are inserted within the same transaction during **flush**, if something fails the state remains clean.

Basically you can track any change from these log entries if they were managed through standard **ORM** operations.

**NOTE:** audit cannot track DQL or direct SQL updates or delete statement executions.

This bundle is inspired by [damienharper/doctrine-audit-bundle](https://github.com/DamienHarper/DoctrineAuditBundle) and [simplethings/entity-audit-bundle](https://github.com/simplethings/EntityAuditBundle.git)

Installation
============

[](#installation)

Applications that use Symfony Flex
----------------------------------

[](#applications-that-use-symfony-flex)

Open a command console, enter your project directory and execute:

```
composer require kricha/doctrine-audit-bundle
```

Applications that don't use Symfony Flex
----------------------------------------

[](#applications-that-dont-use-symfony-flex)

### Step 1: Download the Bundle

[](#step-1-download-the-bundle)

Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:

```
composer require kricha/doctrine-audit-bundle
```

This command requires you to have Composer installed globally, as explained in the [installation chapter](https://getcomposer.org/doc/00-intro.md)of the Composer documentation.

### Step 2: Enable the Bundle

[](#step-2-enable-the-bundle)

Then, enable the bundle by adding it to the list of registered bundles in the `app/AppKernel.php` file of your project:

```
