PHPackages                             shamanzpua/entity-change-log-behavior - 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. shamanzpua/entity-change-log-behavior

ActiveLibrary[Logging &amp; Monitoring](/categories/logging)

shamanzpua/entity-change-log-behavior
=====================================

Yii2 Behavior. Logger for entity changes

1.0.3(9y ago)01.2kPHP

Since Apr 12Pushed 9y ago1 watchersCompare

[ Source](https://github.com/shamanzpua/entity-change-log-behavior)[ Packagist](https://packagist.org/packages/shamanzpua/entity-change-log-behavior)[ RSS](/packages/shamanzpua-entity-change-log-behavior/feed)WikiDiscussions master Synced yesterday

READMEChangelog (4)Dependencies (1)Versions (5)Used By (0)

Entity chane logger behavior
============================

[](#entity-chane-logger-behavior)

Logs models state before and after change

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

[](#installation)

Add to composer.json

```
 "require": {
    "shamanzpua/entity-change-log-behavior": "*"
 }

```

Usage:
------

[](#usage)

```
 public function behaviors()
  {
      return [
          [
              'class' => EntityChangeLogBehavior::class,

              'logModelClass' => Log::class,  //ActiveRecord log table class

              'attributes' => [   //attributes of owner. Default: all attributes
                  'name',
                  'date',
                  'id',
              ],

              'columns' => [  //Required log table columns
                  'action' => 'action_column_name' // Default 'action',
                  'new_value' => 'new_value_column_name' // Default 'new_value',
                  'old_value' => 'old_value_column_name' // Default 'old_value',
              ],

              'relatedAttributes' => [   //attributes of owners relations
                  'user' => ['email'],
                  'category' => ['name'],
              ],

              'additionalLogTableFields' => [   //additional log table fields. key -> log table col, value -> owners col
                  'log_item_name' => 'title',
              ],
          ]
      ];
  }
```

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity66

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

Total

4

Last Release

3366d ago

### Community

Maintainers

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

---

Top Contributors

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

---

Tags

phpyii2Behaviorchange

### Embed Badge

![Health badge](/badges/shamanzpua-entity-change-log-behavior/health.svg)

```
[![Health](https://phpackages.com/badges/shamanzpua-entity-change-log-behavior/health.svg)](https://phpackages.com/packages/shamanzpua-entity-change-log-behavior)
```

###  Alternatives

[craftcms/cms

Craft CMS

3.6k3.6M2.9k](/packages/craftcms-cms)

PHPackages © 2026

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