PHPackages                             one-art/itchanged - 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. [Framework](/categories/framework)
4. /
5. one-art/itchanged

ActiveExtension[Framework](/categories/framework)

one-art/itchanged
=================

extension for yii1

1.0.x-dev(11y ago)294MITPHPPHP &gt;=5.3.0

Since Sep 23Pushed 11y ago2 watchersCompare

[ Source](https://github.com/One-art/itchanged)[ Packagist](https://packagist.org/packages/one-art/itchanged)[ RSS](/packages/one-art-itchanged/feed)WikiDiscussions master Synced 5d ago

READMEChangelogDependenciesVersions (2)Used By (0)

\#ItChanged - Extension for Yii 1
=================================

[](#itchanged---extension-for-yii-1)

This extension help to save model state before updating and check which attribute has been changed.

For example, you want to check if user name changed or not and after update some cache and etc.

```
public function beforeSave() {
    if($this->itChanged('username'))
        echo 'changed';
    else
        echo 'not changed';
}
```

You also can see how it changed. Use method *$this-&gt;getModelState()*This method return associative array: *\[ %attribute\_name% =&gt; %attribute\_value%, ... \]*

### Installation

[](#installation)

I recommended use trait. (only for PHP &gt;= 5.4.0) For example:

```
class User extends CActiveRecord {
    use ItChangedExtension\ItChangedTrait;
}
```

Simple, after use your class extending functional from trait.

But extension support old way to use throw extend. If you have model which extend CActiveRecord, you just change extend to ItChangedActiveRecord class Same with CForm and CModel

For import files if you not use composer, just add include\_once in your index.php before yii set up.

### Install from composer

[](#install-from-composer)

```
{
 "require": {
 	"one-art/itchanged": "*"
 }
}
```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity44

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

Unknown

Total

1

Last Release

4254d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2612463?v=4)[Nick](/maintainers/One-art)[@One-art](https://github.com/One-art)

---

Top Contributors

[![One-art](https://avatars.githubusercontent.com/u/2612463?v=4)](https://github.com/One-art "One-art (6 commits)")

---

Tags

modelstateextensionyii

### Embed Badge

![Health badge](/badges/one-art-itchanged/health.svg)

```
[![Health](https://phpackages.com/badges/one-art-itchanged/health.svg)](https://phpackages.com/packages/one-art-itchanged)
```

PHPackages © 2026

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