PHPackages                             setbased/php-audit - 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. setbased/php-audit

ActiveLibrary[Database &amp; ORM](/categories/database)

setbased/php-audit
==================

A tool for creating audit tables and triggers for logging data changes in a MySQL database.

1.11.0(1y ago)3836.4k↓12.6%8[1 issues](https://github.com/SetBased/php-audit/issues)MITPHPPHP &gt;=8.3CI failing

Since Jun 16Pushed 1y ago7 watchersCompare

[ Source](https://github.com/SetBased/php-audit)[ Packagist](https://packagist.org/packages/setbased/php-audit)[ RSS](/packages/setbased-php-audit/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (10)Dependencies (10)Versions (23)Used By (0)

PhpAudit
========

[](#phpaudit)

SocialLegalDocsReleaseTests[![Gitter](https://camo.githubusercontent.com/3a566d74cfb2b6432e50a2b20a1da7cd2bd95418ed00730510b46e3f4dbe6a82/68747470733a2f2f6261646765732e6769747465722e696d2f53657442617365642f7068702d61756469742e737667)](https://gitter.im/SetBased/php-audit?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)[![License](https://camo.githubusercontent.com/7a2e73fa878b922478c87eee3a71742d160faea0293867b76b1b6d1cd5a751d9/68747470733a2f2f706f7365722e707567782e6f72672f73657462617365642f7068702d61756469742f6c6963656e7365)](https://packagist.org/packages/setbased/php-audit)[![Documentation Status](https://camo.githubusercontent.com/813e3f10c2380bd89f718aaa8eddfcb99066f1b168e20c5033bb722631e3653c/68747470733a2f2f72656164746865646f63732e6f72672f70726f6a656374732f7068702d61756469742f62616467652f3f76657273696f6e3d6c6174657374)](https://php-audit.readthedocs.io/en/latest/?badge=latest)[![Latest Stable Version](https://camo.githubusercontent.com/1bc931431b6ab0b1c8a409778bc183e7a3d54b3ecaf21f7a06d87c4dd7a044dc/68747470733a2f2f706f7365722e707567782e6f72672f73657462617365642f7068702d61756469742f762f737461626c65)](https://packagist.org/packages/setbased/php-audit)
[![Build Status](https://github.com/SetBased/php-audit/actions/workflows/unit.yml/badge.svg)](https://github.com/SetBased/php-audit/actions/workflows/unit.yml)
[![Code Coverage](https://camo.githubusercontent.com/4c27c46aa295d00025b572bf4b01c585a671a03c9d31e00ee9f9a9a1343cb57c/68747470733a2f2f636f6465636f762e696f2f67682f53657442617365642f7068702d61756469742f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://codecov.io/gh/SetBased/php-audit)PhpAudit is a tool for creating and maintaining audit tables and triggers for creating audit trails of data changes in MySQL databases.

Features
--------

[](#features)

PhpAudit has the following features:

- Creates audit tables for tables in your database for which auditing is required.
- Creates triggers on tables for recording inserts, updates, and deletes of rows.
- Helps you to maintain audit tables and triggers when you modify your application's tables.
- Reports differences in table structure between your application's tables and audit tables.
- Disabling triggers under certain conditions.
- Flexible configuration. You can define additional columns to audit tables, for example: logging user and session IDs.

Using the audit trail you track changes made to the data of your application by the users of the application. Even of data that has been deleted or changed back to its original state. Also, you can track how your application manipulates data and find bugs if your application.

Manual
------

[](#manual)

The manual of PhpAudit is available at [Read the Docs](https://php-audit.readthedocs.io).

Contributing
------------

[](#contributing)

We are looking for contributors. We can use your help for:

- Fixing bugs and solving issues.
- Writing documentation.
- Developing new features.
- Code review.
- Implementing PhpAudit for other database systems.

You can contribute to this project in many ways:

- Fork this project on [GitHub](https://github.com/SetBased/php-audit) and create a pull request.
- Create an [issue](https://github.com/SetBased/php-audit/issues/new) on GitHub.
- Asking critical questions.
- Contacting us at [Gitter](https://gitter.im/SetBased/php-audit).

Support
-------

[](#support)

If you are having issues, please let us know. Contact us at [Gitter](https://gitter.im/SetBased/php-audit) or create an issue on [GitHub](https://github.com/SetBased/php-audit/issues/new).

For commercial support, please contact us at .

License
-------

[](#license)

The project is licensed under the MIT license.

###  Health Score

53

—

FairBetter than 96% of packages

Maintenance47

Moderate activity, may be stable

Popularity41

Moderate usage in the ecosystem

Community16

Small or concentrated contributor base

Maturity88

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 73.5% 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 ~121 days

Recently: every ~224 days

Total

22

Last Release

390d ago

Major Versions

0.9.9 → 1.0.02019-09-10

PHP version history (6 changes)0.9.6PHP &gt;=7.1.0

1.4.0PHP &gt;=7.2.0

1.5.0PHP &gt;=7.3

1.7.0PHP &gt;=7.4

1.9.0PHP &gt;=8.1

1.11.0PHP &gt;=8.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/67edc824131704a5270570c8bba7fc52986f3e70a0389aca6b13ea87ca4d9710?d=identicon)[Paul Water](/maintainers/Paul%20Water)

---

Top Contributors

[![prwater](https://avatars.githubusercontent.com/u/17372665?v=4)](https://github.com/prwater "prwater (355 commits)")[![DmitriyNagorniy](https://avatars.githubusercontent.com/u/49651476?v=4)](https://github.com/DmitriyNagorniy "DmitriyNagorniy (127 commits)")[![gitter-badger](https://avatars.githubusercontent.com/u/8518239?v=4)](https://github.com/gitter-badger "gitter-badger (1 commits)")

---

Tags

audit-tablesaudit-trailchangelogmariadbmysqltriggersmysqlAudittriggers

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/setbased-php-audit/health.svg)

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

PHPackages © 2026

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