PHPackages                             bedezign/yii2-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. [Logging &amp; Monitoring](/categories/logging)
4. /
5. bedezign/yii2-audit

ActiveYii2-extension[Logging &amp; Monitoring](/categories/logging)

bedezign/yii2-audit
===================

Yii2 Audit records and displays web/cli requests, database changes, php/js errors and associated data.

1.2.8(9mo ago)202705.8k↓39.4%117[24 issues](https://github.com/bedezign/yii2-audit/issues)[1 PRs](https://github.com/bedezign/yii2-audit/pulls)4MITPHPPHP &gt;=7.2.0

Since May 22Pushed 9mo ago24 watchersCompare

[ Source](https://github.com/bedezign/yii2-audit)[ Packagist](https://packagist.org/packages/bedezign/yii2-audit)[ RSS](/packages/bedezign-yii2-audit/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (10)Dependencies (4)Versions (37)Used By (4)

Yii2 Audit
==========

[](#yii2-audit)

[![Join Chat](https://camo.githubusercontent.com/d2564c910189e9b0564bc25c2776097d674daa07a4060c3aa51b60cb1a476b0b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6769747465722d6a6f696e253230636861742d626c75652e7376673f7374796c653d666c61742d737175617265)](https://gitter.im/bedezign/yii2-audit?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)[![Latest Version](https://camo.githubusercontent.com/884d2f94b2bcaebf54b271986e1a21b6e809cdffba27d187188f8675e00f2d2d/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f7461672f626564657a69676e2f796969322d61756469742e7376673f7374796c653d666c61742d737175617265266c6162656c3d72656c65617365)](https://github.com/bedezign/yii2-audit/tags)[![Software License](https://camo.githubusercontent.com/b60331a2084501dc07cf6d6964c0da58dd005d89c45cf3b28b4b22b60f5ec00f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4253442d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](https://github.com/bedezign/yii2-audit/blob/master/LICENSE.md)[![Build Status](https://camo.githubusercontent.com/f1cc6c7fcef7f968a5573f5d9f8b7f2306ed9ce2833716ccc5ab8973ce5ebdc2/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f626564657a69676e2f796969322d61756469742f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/bedezign/yii2-audit)[![HHVM](https://camo.githubusercontent.com/614b1432536df11b482529dacc66d0c6e140774f0161ecb0c3db1579dc4adf77/68747470733a2f2f696d672e736869656c64732e696f2f6868766d2f626564657a69676e2f796969322d61756469742e7376673f7374796c653d666c61742d737175617265)](http://hhvm.h4cc.de/package/bedezign/yii2-audit)[![Coverage Status](https://camo.githubusercontent.com/4cca2b53b9ee88300528a925f12c6849f46206c342d14d6d988d6c016e76d9c9/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f626564657a69676e2f796969322d61756469742e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/bedezign/yii2-audit/code-structure)[![Quality Score](https://camo.githubusercontent.com/dd35f3050f49e3f739558cc6bcd3be7535a8a8e1a3c22ead7fb51570c5976cb5/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f626564657a69676e2f796969322d61756469742e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/bedezign/yii2-audit)[![Total Downloads](https://camo.githubusercontent.com/49c8afacd3fdb9e877068dcc56fc62d5807948ecca4c892d385623a59555417c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f626564657a69676e2f796969322d61756469742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/bedezign/yii2-audit)[![Yii2 Framework](https://camo.githubusercontent.com/3ff0c442887a9ac3e5f8694726009b7d059a3f34b1d9a0cdc9f3f20969d98a82/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f657874656e73696f6e2d596969325f4672616d65776f726b2d677265656e2e7376673f7374796c653d666c61742d737175617265)](http://www.yiiframework.com/extension/yii2-audit)

Yii2 Audit records and displays web/cli requests, database changes, php/js errors and associated data.

New stewardship from March 2024 on
----------------------------------

[](#new-stewardship-from-march-2024-on)

We (@schmunk42, @eluhr) have taken stewardship of this project. Thank you @Blizzke for adding us to the GitHub maintainer list. Since we are still using this extension extensively, we are focussing on backward-compatibility and improvements.

Upgrading
---------

[](#upgrading)

### yii2-audit `1.2.x`

[](#yii2-audit-12x)

Existing projects with non-namespace migrations need to include `@bedezign/yii2/audit/migrations/1.1.x` in `migrationPath and skip namespaced migrations. (Issue #271)

### PHP7.2 &amp; Yii 2.0.13 or later

[](#php72--yii-2013-or-later)

From `PHP 7.2` on `Object` became a reserved keyword. Since enough time went by, we decided to assume everyone is on 7.2 and Yii 2.0.13 by now we won't be keeping `1.0.*`-branch (pre PHP 7.2) up to date anymore.

Please use version `1.1.*` or later.

Features
--------

[](#features)

### Powerful, yet Simple

[](#powerful-yet-simple)

- Installs as a simple module so it can be added without any hassle.
- You can either track specific actions and nothing else or exclude specific routes from logging (wildcard supported).
- View your data. The module contains a nice viewer that is automatically made available when you add it to your configuration. It has configurable permissions to limit access to this functionality by IPs, roles or users.

### Minimal Footprint

[](#minimal-footprint)

Tracks minimal data in the base entry:

- `user_id` - User ID of the visitor (if any), based on `Yii::$app->user->id`.
- `ip` - IP Address of the visitor.
- `request_method` - The method used to generate the request, eg: `CLI` for console requests and `GET`, `POST`, `DELETE`, `PUT`, `PATCH`, `OPTIONS` or `HEAD` for web requests.
- `ajax` - If the page was requested using ajax.
- `route` - The controller and action of the request.
- `duration` - How long the request took to serve.
- `memory_max` - The peak memory usage during the request.
- `created` - The datetime the entry was created.

### Log Data using Configurable Panels

[](#log-data-using-configurable-panels)

Each panel is optional, and you can even create your own.

- `RequestPanel` - Tracks all incoming web and console request data:
    - URL Information including the route and params.
    - PHP SuperGlobals `$_GET`, `$_POST`, `$_SERVER`, `$_FILES` and `$_COOKIES`.
    - Headers from the Request and Response.
- `AssetPanel` - Asset Bundles loaded for the request.
- `ConfigPanel` - Yii and PHP configuration that was used for the request.
- `DbPanel` - SQL queries.
- `ErrorPanel` - Record all PHP exceptions and errors in the background. Once logged you can configure a cron task to email the errors to a developer so issues can be fixed before they are even reported by a user. [more info](https://bedezign.github.io/yii2-audit/docs/error-panel/)
- `JavascriptPanel` - Automatically log JavaScript errors. Errors and warning are logged automatically by including `JSLoggingAsset` asset bundle. The javascript component also provides methods to manually add logging entries. [more info](https://bedezign.github.io/yii2-audit/docs/javascript-panel/)
- `LogPanel` - Yii logs.
- `MailPanel` - Emails that were sent during the request. [more info](https://bedezign.github.io/yii2-audit/docs/mail-panel/)
- `ProfilingPanel` - Application profiling information.
- `TrailPanel` - Database changes that were made during the request using the `AuditTrailBehavior`. [more info](https://bedezign.github.io/yii2-audit/docs/trail-panel/)
- `ExtraDataPanel` - Extra data that you want to store. [more info](https://bedezign.github.io/yii2-audit/docs/extra-data-panel/)
- `CurlPanel` - Track your applications cURL requests (including replies, log and headers) [more info](https://bedezign.github.io/yii2-audit/docs/curl-panel/)
- `YourOwnPanel` - Create your own panel to capture any data you want. [more info](https://bedezign.github.io/yii2-audit/docs/custom-views-panel/)

Documentation
-------------

[](#documentation)

Getting started? Try the [Installation Guide](https://bedezign.github.io/yii2-audit/docs/installation/). You will find further information in the [Documentation](https://bedezign.github.io/yii2-audit/docs/).

For changes since the last version see the [Changelog](https://github.com/bedezign/yii2-audit/blob/master/CHANGELOG.md).

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

[](#screenshots)

### Dashboard

[](#dashboard)

[![Dashboard](https://cloud.githubusercontent.com/assets/51875/8369827/b70355ee-1bfe-11e5-9748-dd864f0500de.png)](https://cloud.githubusercontent.com/assets/51875/8369827/b70355ee-1bfe-11e5-9748-dd864f0500de.png)

### Entry View

[](#entry-view)

[![Audit Entry View](https://cloud.githubusercontent.com/assets/51875/8395061/3b004aca-1d97-11e5-8b71-6787c662ea3e.png)](https://cloud.githubusercontent.com/assets/51875/8395061/3b004aca-1d97-11e5-8b71-6787c662ea3e.png)

### More Screenshots

[](#more-screenshots)

More images are available from the [Screenshots](https://bedezign.github.io/yii2-audit/screenshots/) page.

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

[](#contributing)

Contributions are welcome. Please refer to the [contributing guidelines](https://github.com/bedezign/yii2-audit/blob/master/CONTRIBUTING.md).

Thanks to [everyone who has contributed](https://github.com/bedezign/yii2-audit/blob/master/CREDITS.md).

Project Resources
-----------------

[](#project-resources)

- [Project Homepage](https://bedezign.github.io/yii2-audit/)
- [Live Demo](https://yii2-audit.herokuapp.com/)
- [GitHub Project](https://github.com/bedezign/yii2-audit)
- [Yii2 Extension](http://www.yiiframework.com/extension/yii2-audit)
- [Packagist Package](https://packagist.org/packages/bedezign/yii2-audit)
- [Travis CI Testing](https://travis-ci.org/bedezign/yii2-audit)
- [Scrutinizer CI Code Quality](https://scrutinizer-ci.com/g/bedezign/yii2-audit)

License
-------

[](#license)

BSD-3 - Please refer to the [license](https://github.com/bedezign/yii2-audit/blob/master/LICENSE.md). [![Analytics](https://camo.githubusercontent.com/8685be34b7955eee49308d6a51134da29937aa968c962844d8dff6f22272ba67/68747470733a2f2f67612d626561636f6e2e61707073706f742e636f6d2f55412d36353130343333342d332f796969322d61756469742f524541444d452e6d643f706978656c)](https://camo.githubusercontent.com/8685be34b7955eee49308d6a51134da29937aa968c962844d8dff6f22272ba67/68747470733a2f2f67612d626561636f6e2e61707073706f742e636f6d2f55412d36353130343333342d332f796969322d61756469742f524541444d452e6d643f706978656c)

###  Health Score

58

—

FairBetter than 98% of packages

Maintenance55

Moderate activity, may be stable

Popularity58

Moderate usage in the ecosystem

Community39

Small or concentrated contributor base

Maturity70

Established project with proven stability

 Bus Factor1

Top contributor holds 71.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 ~111 days

Recently: every ~144 days

Total

35

Last Release

278d ago

Major Versions

0.1.6 → 1.0.02015-07-08

PHP version history (2 changes)0.1.1PHP &gt;=5.4.0

1.1.2PHP &gt;=7.2.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/07c84a589344489e8195ec1c6afcfa3abcc23a73092ceaa4ca60da96355c4d16?d=identicon)[cornernote](/maintainers/cornernote)

![](https://avatars.githubusercontent.com/u/22366?v=4)[Blizz](/maintainers/Blizz)[@blizz](https://github.com/blizz)

---

Top Contributors

[![cornernote](https://avatars.githubusercontent.com/u/51875?v=4)](https://github.com/cornernote "cornernote (696 commits)")[![Blizzke](https://avatars.githubusercontent.com/u/231572?v=4)](https://github.com/Blizzke "Blizzke (165 commits)")[![eluhr](https://avatars.githubusercontent.com/u/13000805?v=4)](https://github.com/eluhr "eluhr (32 commits)")[![schmunk42](https://avatars.githubusercontent.com/u/649031?v=4)](https://github.com/schmunk42 "schmunk42 (20 commits)")[![MGHollander](https://avatars.githubusercontent.com/u/1532664?v=4)](https://github.com/MGHollander "MGHollander (14 commits)")[![ilgiz-badamshin](https://avatars.githubusercontent.com/u/7591988?v=4)](https://github.com/ilgiz-badamshin "ilgiz-badamshin (10 commits)")[![thyseus](https://avatars.githubusercontent.com/u/654271?v=4)](https://github.com/thyseus "thyseus (5 commits)")[![karataserkan](https://avatars.githubusercontent.com/u/7448716?v=4)](https://github.com/karataserkan "karataserkan (5 commits)")[![Nash-x9](https://avatars.githubusercontent.com/u/12541919?v=4)](https://github.com/Nash-x9 "Nash-x9 (3 commits)")[![amaelftah](https://avatars.githubusercontent.com/u/17250137?v=4)](https://github.com/amaelftah "amaelftah (2 commits)")[![filipe1309](https://avatars.githubusercontent.com/u/2081014?v=4)](https://github.com/filipe1309 "filipe1309 (2 commits)")[![gb96](https://avatars.githubusercontent.com/u/526473?v=4)](https://github.com/gb96 "gb96 (2 commits)")[![thtmorais](https://avatars.githubusercontent.com/u/18515639?v=4)](https://github.com/thtmorais "thtmorais (2 commits)")[![Matej-ch](https://avatars.githubusercontent.com/u/12380989?v=4)](https://github.com/Matej-ch "Matej-ch (2 commits)")[![lisps](https://avatars.githubusercontent.com/u/5764551?v=4)](https://github.com/lisps "lisps (2 commits)")[![coolTr1x](https://avatars.githubusercontent.com/u/13169474?v=4)](https://github.com/coolTr1x "coolTr1x (2 commits)")[![WJRovers](https://avatars.githubusercontent.com/u/8059129?v=4)](https://github.com/WJRovers "WJRovers (1 commits)")[![githubjeka](https://avatars.githubusercontent.com/u/874234?v=4)](https://github.com/githubjeka "githubjeka (1 commits)")[![krsch](https://avatars.githubusercontent.com/u/1208686?v=4)](https://github.com/krsch "krsch (1 commits)")[![lucianolima00](https://avatars.githubusercontent.com/u/40531239?v=4)](https://github.com/lucianolima00 "lucianolima00 (1 commits)")

---

Tags

loggingAudityii2trail

### Embed Badge

![Health badge](/badges/bedezign-yii2-audit/health.svg)

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

###  Alternatives

[craftcms/cms

Craft CMS

3.6k3.6M3.1k](/packages/craftcms-cms)[sammaye/yii2-audittrail

A port of audit trail

40417.9k](/packages/sammaye-yii2-audittrail)

PHPackages © 2026

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