PHPackages                             denq/yii2-record-replacer - 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. denq/yii2-record-replacer

ActiveYii2-extension[Framework](/categories/framework)

denq/yii2-record-replacer
=========================

Record replacer a help tool for yii2 framework

0.0.4(10y ago)061[1 issues](https://github.com/DenQ/yii2-record-replacer/issues)MITPHP

Since Dec 4Pushed 10y ago1 watchersCompare

[ Source](https://github.com/DenQ/yii2-record-replacer)[ Packagist](https://packagist.org/packages/denq/yii2-record-replacer)[ RSS](/packages/denq-yii2-record-replacer/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependencies (1)Versions (5)Used By (0)

yii2-recod-replacer
===================

[](#yii2-recod-replacer)

Record replacer a component for safe add new records or replacing that already exists

Install
=======

[](#install)

```
    composer require "denq/yii2-record-replacer"
```

Configure
=========

[](#configure)

```
    'components' => [
        'RecordReplacer' => [
            'class' => 'RecordReplacer\RecordReplacer',
        ],
        ...
    ]
```

Usage
=====

[](#usage)

```
    Yii::$app->RecordReplacer->Run($model, $fields, $primary)
```

- $model

    - type: \\yii\\db\\ActiveRecord
    - description: your active record model
    - required: true
- $fields

    - type: array
    - description: array with fields and values
    - required: true
- $primary

    - type: array
    - description: searchable fields
    - required: false
    - default value: \[\]

Example
=======

[](#example)

```
    Yii::$app->RecordReplacer->Run(new CustomModel, [
        'field_1' => 'val 1',
        'field_2' => 'val 2',
        ...
        'field_n' => 'val n',
    ], [
        'field_n'
    ]);
```

###  Health Score

25

—

LowBetter than 36% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity56

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

Every ~2 days

Total

4

Last Release

3853d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1102005?v=4)[Denis Ivanov](/maintainers/DenQ)[@DenQ](https://github.com/DenQ)

---

Top Contributors

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

---

Tags

recordyii2activerecordinsertreplacear

### Embed Badge

![Health badge](/badges/denq-yii2-record-replacer/health.svg)

```
[![Health](https://phpackages.com/badges/denq-yii2-record-replacer/health.svg)](https://phpackages.com/packages/denq-yii2-record-replacer)
```

###  Alternatives

[craftcms/cms

Craft CMS

3.6k3.6M2.9k](/packages/craftcms-cms)[yiisoft/yii2-app-advanced

Yii 2 Advanced Project Template

1.7k960.6k5](/packages/yiisoft-yii2-app-advanced)[yiisoft/yii2-redis

Redis Cache, Session and ActiveRecord for the Yii framework

44912.1M264](/packages/yiisoft-yii2-redis)[yiisoft/yii2-httpclient

HTTP client extension for the Yii framework

43011.4M323](/packages/yiisoft-yii2-httpclient)[yiisoft/yii2-debug

The debugger extension for the Yii framework

20324.2M616](/packages/yiisoft-yii2-debug)[yiisoft/yii2-app-basic

Yii 2 Basic Project Template

6761.8M8](/packages/yiisoft-yii2-app-basic)

PHPackages © 2026

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