PHPackages                             philippgrashoff/auditforatk - 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. philippgrashoff/auditforatk

ActiveLibrary

philippgrashoff/auditforatk
===========================

6.2.1(3mo ago)01.1k↓46.4%1PHPPHP 8.3.\*CI passing

Since Apr 3Pushed 3mo ago1 watchersCompare

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

READMEChangelog (10)Dependencies (6)Versions (22)Used By (1)

auditforatk
===========

[](#auditforatk)

[![codecov](https://camo.githubusercontent.com/2e27b1716157d4e7fad0c18015b0a1e197afc515d6077b44feb7f35db911e2fb/68747470733a2f2f636f6465636f762e696f2f67682f5068696c69707047726173686f66662f6175646974666f7261746b2f6272616e63682f6d61696e2f67726170682f62616467652e737667)](https://codecov.io/gh/PhilippGrashoff/auditforatk)

This is an extension for [atk4/data](https://github.com/atk4/data). It is used to create a human-readable audit of changes made to models and other actions. It is NOT meant to add the ability to undo changes.

How the final audit looks like is up to you - you can implement the rendering yourself. A sample audit of a `Country` model could look like:

```
2023-04-17
14:34 Some User       created this Country.
14:34 Some User       set "name" to "Germny".
14:34 Some User       set "iso country code" to "GER".
15:17 Another User    changed "name" to "Germany".

2023-04-21
13:13 YetAnotherUser  set "continent" to "America".
15:19 Another User    changed "continent" to "Europe".
15:19 Another User    enabled periodic info emails for this country.

```

In this example, the last entry is not about a field change, but audits a custom action.

Contents
========

[](#contents)

- `Audit`: This class saves all data for an audit entry. For performant reading/displaying, only `created_date`, `user_name` and `rendered_message` fields are needed. However, each audit object also stores all information to re-render an audit message, e.g. if the desired output format was changed, the title of a hasOne relation was updated or for translation.
- `AuditTrait`: This Trait is added to any Model which should be audited. It sets the necessary hooks to create audits on creation, any field change and on deletion. Fields can be excluded from audit for each model.
- `AuditController`: Contains all logic how an Audit should be created. If you want other Audits than mere field audits, you need to extend this class to fit your purposes.
- `MessageRenderer`: Highly coupled with `AuditController`. It takes care of rendering a human-readable message for each Audit. You can extend this class to have a different output format, e.g. have rendered HTML in the rendered message. The result is saved in `Audit` `rendered_message` field.
- `SkipFieldsCOntroller`: A controller used in `AuditController`. It contains the logic which fields should be excluded from audit. Extend to your own needs.

###  Health Score

50

—

FairBetter than 96% of packages

Maintenance81

Actively maintained with recent releases

Popularity19

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity76

Established project with proven stability

 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 ~88 days

Recently: every ~17 days

Total

21

Last Release

103d ago

Major Versions

2.4 → 4.0.02023-09-19

4.0.0 → 5.0.02023-10-02

5.0.1 → 6.0.02025-11-17

PHP version history (2 changes)4.0.0PHP 8.\*

6.0.0PHP 8.3.\*

### Community

Maintainers

![](https://www.gravatar.com/avatar/b8d7dc9f818ca121a41b3d19bd263147b404e0488096d2357729dea14232ec6e?d=identicon)[Philipp Reisigl](/maintainers/Philipp%20Reisigl)

---

Top Contributors

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

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/philippgrashoff-auditforatk/health.svg)

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

###  Alternatives

[atk4/ui

Agile UI - Web Component Framework written in PHP

454540.1k32](/packages/atk4-ui)

PHPackages © 2026

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