PHPackages                             krowek/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. krowek/audit-bundle

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

krowek/audit-bundle
===================

Audit bundle for symfony2 and doctrine orm, logs any database change

v0.1.8(8y ago)015MITPHPPHP &gt;=5.4.0

Since Aug 11Pushed 8y ago1 watchersCompare

[ Source](https://github.com/krowek/DataDogAuditBundle)[ Packagist](https://packagist.org/packages/krowek/audit-bundle)[ Docs](http://github.com/DATA-DOG/DataDogAuditBundle)[ RSS](/packages/krowek-audit-bundle/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (11)Versions (10)Used By (0)

Audit bundle
============

[](#audit-bundle)

This bundle creates an audit log 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 will link him to the log.
- 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.

Install
-------

[](#install)

First, install it with composer:

```
composer require data-dog/audit-bundle

```

Then, add it in your **AppKernel** bundles.

```
// app/AppKernel.php
public function registerBundles()
{
    $bundles = array(
        ...
        new DataDog\AuditBundle\DataDogAuditBundle(),
        ...
    );
    ...
}

```

Finally, create the database tables used by the bundle:

Using [Doctrine Migrations Bundle](http://symfony.com/doc/current/bundles/DoctrineMigrationsBundle/index.html):

```
php app/console doctrine:migrations:diff
php app/console doctrine:migrations:migrate

```

Using Doctrine Schema:

```
php app/console doctrine:schema:update --force

```

Demo
----

[](#demo)

The best way to see features is to see the actual demo. Just clone the bundle and run:

```
make

```

Visit **** to see the log actions.

The demo application source is available in **example** directory and it is a basic symfony application.

Usage
-----

[](#usage)

**audit** entities will be mapped automatically if you run schema update or similar. And all the database changes will be reflected in the audit log afterwards.

### Unaudited Entities

[](#unaudited-entities)

Sometimes, you might not want to create audit log entries for particular entities. You can achieve this by listing those entities under the `unaudited_entities` configuration key in your `config.yml`, for example:

```
data_dog_audit:
    unaudited_entities:
        - AppBundle\Entity\NoAuditForThis

```

### Specify Audited Entities

[](#specify-audited-entities)

Sometimes, it is also possible, that you want to create audit log entries only for particular entities. You can achieve it quite similar to unaudited entities. You can list them under the `audited_entities` configuration key in your `config.yml`, for example:

```
data_dog_audit:
    audited_entities:
        - AppBundle\Entity\AuditForThis

```

You can specify either audited or unaudited entities. If both are specified, only audited entities would be taken into account.

Screenshots
-----------

[](#screenshots)

All paginated audit log: [![Screenshot](https://camo.githubusercontent.com/3f96b6705ef6537725340d0d9dbfcc1670751876ac3d2e61487bb3d2fcd23b5d/68747470733a2f2f7261772e6769746875622e636f6d2f444154412d444f472f44617461446f67417564697442756e646c652f6d61737465722f73637265656e73686f74732f6175646974312e706e67)](https://camo.githubusercontent.com/3f96b6705ef6537725340d0d9dbfcc1670751876ac3d2e61487bb3d2fcd23b5d/68747470733a2f2f7261772e6769746875622e636f6d2f444154412d444f472f44617461446f67417564697442756e646c652f6d61737465722f73637265656e73686f74732f6175646974312e706e67)

Clicked on history reference for specific resource: [![Screenshot](https://camo.githubusercontent.com/0d31a7e7992befd7121d554660bc0d88d13fd4cb2132c6c682df8c88fa90dd5a/68747470733a2f2f7261772e6769746875622e636f6d2f444154412d444f472f44617461446f67417564697442756e646c652f6d61737465722f73637265656e73686f74732f6175646974322e706e67)](https://camo.githubusercontent.com/0d31a7e7992befd7121d554660bc0d88d13fd4cb2132c6c682df8c88fa90dd5a/68747470733a2f2f7261772e6769746875622e636f6d2f444154412d444f472f44617461446f67417564697442756e646c652f6d61737465722f73637265656e73686f74732f6175646974322e706e67)

Showing insert data: [![Screenshot](https://camo.githubusercontent.com/12b4d644096ef9972a7db938adf4fc90159acdfdbe8b05b7a531233535f7e20d/68747470733a2f2f7261772e6769746875622e636f6d2f444154412d444f472f44617461446f67417564697442756e646c652f6d61737465722f73637265656e73686f74732f6175646974332e706e67)](https://camo.githubusercontent.com/12b4d644096ef9972a7db938adf4fc90159acdfdbe8b05b7a531233535f7e20d/68747470733a2f2f7261772e6769746875622e636f6d2f444154412d444f472f44617461446f67417564697442756e646c652f6d61737465722f73637265656e73686f74732f6175646974332e706e67)

License
-------

[](#license)

The audit bundle is free to use and is licensed under the [MIT license](http://www.opensource.org/licenses/mit-license.php)

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 58.8% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~99 days

Recently: every ~127 days

Total

9

Last Release

3127d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/11586457?v=4)[Mateusz](/maintainers/krowek)[@krowek](https://github.com/krowek)

---

Top Contributors

[![l3pp4rd](https://avatars.githubusercontent.com/u/132389?v=4)](https://github.com/l3pp4rd "l3pp4rd (20 commits)")[![chancegarcia](https://avatars.githubusercontent.com/u/348263?v=4)](https://github.com/chancegarcia "chancegarcia (3 commits)")[![andreasferber](https://avatars.githubusercontent.com/u/4956110?v=4)](https://github.com/andreasferber "andreasferber (3 commits)")[![krzysztofruszczynski](https://avatars.githubusercontent.com/u/9629651?v=4)](https://github.com/krzysztofruszczynski "krzysztofruszczynski (2 commits)")[![krowek](https://avatars.githubusercontent.com/u/11586457?v=4)](https://github.com/krowek "krowek (2 commits)")[![vytautas-k](https://avatars.githubusercontent.com/u/10547406?v=4)](https://github.com/vytautas-k "vytautas-k (2 commits)")[![ndench](https://avatars.githubusercontent.com/u/2062388?v=4)](https://github.com/ndench "ndench (1 commits)")[![phryneas](https://avatars.githubusercontent.com/u/4282439?v=4)](https://github.com/phryneas "phryneas (1 commits)")

---

Tags

logbundleormdoctrineSymfony2Audit

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/krowek-audit-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/krowek-audit-bundle/health.svg)](https://phpackages.com/packages/krowek-audit-bundle)
```

###  Alternatives

[data-dog/audit-bundle

Audit bundle for symfony2 and doctrine orm, logs any database change

141901.7k1](/packages/data-dog-audit-bundle)[sonata-project/doctrine-orm-admin-bundle

Integrate Doctrine ORM into the SonataAdminBundle

46117.7M155](/packages/sonata-project-doctrine-orm-admin-bundle)[data-dog/pager-bundle

Paginator bundle for symfony2 and doctrine orm, allows customization with filters and sorters

11103.5k7](/packages/data-dog-pager-bundle)[rcsofttech/audit-trail-bundle

Enterprise-grade, high-performance Symfony audit trail bundle. Automatically track Doctrine entity changes with split-phase architecture, multiple transports (HTTP, Queue, Doctrine), and sensitive data masking.

1022.4k](/packages/rcsofttech-audit-trail-bundle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
