PHPackages                             jansuchanek/naudit - 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. jansuchanek/naudit

ActiveLibrary

jansuchanek/naudit
==================

Doctrine entity audit log for Nette — automatic change tracking with user context

v1.1.0(1mo ago)01↓100%1MITPHPPHP &gt;=8.2CI failing

Since Mar 20Pushed 1mo agoCompare

[ Source](https://github.com/JanSuchanek/naudit)[ Packagist](https://packagist.org/packages/jansuchanek/naudit)[ RSS](/packages/jansuchanek-naudit/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (3)Versions (3)Used By (1)

NAudit
======

[](#naudit)

Doctrine entity audit log for Nette Framework — automatically tracks changes to entities.

Features
--------

[](#features)

- 📝 **Change Tracking** — Records create/update/delete with field diffs
- 🔌 **AuditableInterface** — Mark entities for tracking
- 📊 **JSON Storage** — Changes stored as JSON in `audit_log` table
- ⚙️ **DI Extension** — Auto-registers Doctrine event subscriber

Installation
------------

[](#installation)

```
composer require jansuchanek/naudit
```

Configuration
-------------

[](#configuration)

```
extensions:
    audit: NAudit\DI\NAuditExtension
```

Usage
-----

[](#usage)

Implement `AuditableInterface` on your entities:

```
use NAudit\AuditableInterface;

class Product implements AuditableInterface
{
    use AuditableTrait;

    public function getAuditLabel(): string
    {
        return $this->name;
    }
}
```

Migration
---------

[](#migration)

```
CREATE TABLE audit_log (
    id INT AUTO_INCREMENT PRIMARY KEY,
    entity_class VARCHAR(255) NOT NULL,
    entity_id INT NOT NULL,
    action VARCHAR(16) NOT NULL,
    changes JSON,
    user_id INT,
    created_at DATETIME NOT NULL,
    INDEX idx_entity (entity_class, entity_id)
);
```

Requirements
------------

[](#requirements)

- PHP &gt;= 8.2
- Doctrine ORM ^3.0
- Nette DI ^3.2

License
-------

[](#license)

MIT

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance90

Actively maintained with recent releases

Popularity2

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~0 days

Total

2

Last Release

51d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/38ce2f53e74d810d50aca863e1a3b954f34f1629dd01a6a8c7d4d582e7459e63?d=identicon)[JanSuchanek](/maintainers/JanSuchanek)

---

Top Contributors

[![JanSuchanek](https://avatars.githubusercontent.com/u/310020?v=4)](https://github.com/JanSuchanek "JanSuchanek (4 commits)")

### Embed Badge

![Health badge](/badges/jansuchanek-naudit/health.svg)

```
[![Health](https://phpackages.com/badges/jansuchanek-naudit/health.svg)](https://phpackages.com/packages/jansuchanek-naudit)
```

###  Alternatives

[api-platform/doctrine-orm

Doctrine ORM bridge

243.1M39](/packages/api-platform-doctrine-orm)

PHPackages © 2026

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