PHPackages                             rhosocial/yii2-base-models - 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. rhosocial/yii2-base-models

ActiveYii2-extension[Database &amp; ORM](/categories/database)

rhosocial/yii2-base-models
==========================

The Base Models for Yii 2 Applications.

1.1.0(8y ago)03991AGPLv3PHPPHP &gt;=5.5.0

Since Feb 2Pushed 3y ago1 watchersCompare

[ Source](https://github.com/rhosocial/yii2-base-models)[ Packagist](https://packagist.org/packages/rhosocial/yii2-base-models)[ RSS](/packages/rhosocial-yii2-base-models/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (10)Dependencies (3)Versions (15)Used By (0)

yii2-base-models
================

[](#yii2-base-models)

The Base Models for Yii 2 Applications

[![Latest Stable Version](https://camo.githubusercontent.com/49d8501a2204e81a3383ffd015f107e4e3a3524e12c527b899ba3f9b0d39d160/68747470733a2f2f706f7365722e707567782e6f72672f72686f736f6369616c2f796969322d626173652d6d6f64656c732f762f737461626c652e706e67)](https://packagist.org/packages/rhosocial/yii2-base-models)[![License](https://camo.githubusercontent.com/f62df78918ec3a4a5fdec94acdeb410271cd90a2d9b21ca1517515c765068e2d/68747470733a2f2f706f7365722e707567782e6f72672f72686f736f6369616c2f796969322d626173652d6d6f64656c732f6c6963656e7365)](https://packagist.org/packages/rhosocial/yii2-base-models)[![Reference Status](https://camo.githubusercontent.com/28c2d2d43ed19b35ab5fedfa290657fe31e3674b488b758583606394fec6bfc8/68747470733a2f2f7777772e76657273696f6e6579652e636f6d2f7068702f72686f736f6369616c3a796969322d626173652d6d6f64656c732f7265666572656e63655f62616467652e737667)](https://www.versioneye.com/php/rhosocial:yii2-base-models/references)[![Build Status](https://camo.githubusercontent.com/a65af636f24fc5331b4d6884e3cd08118f8cc3febb1566b8a00ca6a715286211/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f72686f736f6369616c2f796969322d626173652d6d6f64656c732e737667)](http://travis-ci.org/rhosocial/yii2-base-models)[![Dependency Status](https://camo.githubusercontent.com/8b17495acfcda171e20d6319c43eddeba019d29519f4995339c8038c8c811083/68747470733a2f2f7777772e76657273696f6e6579652e636f6d2f7068702f72686f736f6369616c3a796969322d626173652d6d6f64656c732f6465762d6d61737465722f62616467652e706e67)](https://www.versioneye.com/php/rhosocial:yii2-base-models/dev-master)[![Code Coverage](https://camo.githubusercontent.com/2172572ad09ead7cb0af773036631e5f255529535e229bf8a6afde3193c1f441/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f72686f736f6369616c2f796969322d626173652d6d6f64656c732f6261646765732f636f7665726167652e706e67)](https://scrutinizer-ci.com/g/rhosocial/yii2-base-models/)[![Scrutinizer Quality Score](https://camo.githubusercontent.com/4238739820e6d5e27e8c38f0d669a981da84398aded5274d9387f1ff5037f501/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f72686f736f6369616c2f796969322d626173652d6d6f64656c732f6261646765732f7175616c6974792d73636f72652e706e67)](https://scrutinizer-ci.com/g/rhosocial/yii2-base-models/)[![Code Climate](https://camo.githubusercontent.com/cc691acab3f1bd88a57bea6a6a9b93cb5fe2f8079004fe213a0fb2033787f712/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636c696d6174652f6769746875622f72686f736f6369616c2f796969322d626173652d6d6f64656c732e737667)](https://codeclimate.com/github/rhosocial/yii2-base-models)

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

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/). Either run

```
php composer.phar require --prefer-dist rhosocial/yii2-base-models "*"

```

or add

```
"rhosocial/yii2-base-models": "*"

```

to the require section of your `composer.json` file.

If you want to use Redis or MongoDB ActiveRecord, please add

```
"yiisoft/yii2-redis": "*"

```

or

```
"yiisoft/yii2-mongodb": "~2.1.0"

```

to the require section of your `composer.json` file by yourself.

Note: The MongoDB models need [PHP MongoDB extension](https://pecl.php.net/package/mongodb) 1.2.0 or above.

Usage
-----

[](#usage)

Once the extension is installed, simply use it in your code by :

```
use rhosocial\base\models\models\BaseEntityModel;

class Example extends BaseEntityModel
{
...
}
```

further detailed usage seen in code file notes.

Contact Us
----------

[](#contact-us)

[![Join the chat at https://gitter.im/rhosocial/yii2-base-models](https://camo.githubusercontent.com/abe08b740a4156153736f791393ec4da6619c4be73212e75769f52edacc0e2b5/68747470733a2f2f6261646765732e6769747465722e696d2f4a6f696e253230436861742e737667)](https://gitter.im/rhosocial/yii2-base-models?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

If you have any problems or good ideas about yii2-base-models, please discuss there, or send an email to . Thank you!

If you want to send an email with your issues, please briefly introduce yourself first, for instance including your title and github homepage.

[![yii2-base-models](https://camo.githubusercontent.com/197655db65b27e8a680af2dfd2ee400ad58d17859a5336aa63b7f8ee9feb12be/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f506f77657265645f62792d72686f736f6369616c2d677265656e2e7376673f7374796c653d666c6174)](https://dev.rho.social/products/yii2-base-models)

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community8

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

Recently: every ~528 days

Total

13

Last Release

1150d ago

Major Versions

1.1.0 → 2.0.0-alpha2021-10-01

PHP version history (3 changes)1.0.0-alphaPHP &gt;=5.5.0

2.0.0-alphaPHP &gt;=7.3.10

2.0.x-devPHP &gt;=8.2.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/510602d1e442c16029b232024b7d9fb57362600a2e1112d4114aae3d909164f9?d=identicon)[vistart](/maintainers/vistart)

---

Top Contributors

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

---

Tags

modelmongodbphpqueryredisrelational-databasesuseryii2-extensionmodelredismongodbyii2extensionrhosocial

### Embed Badge

![Health badge](/badges/rhosocial-yii2-base-models/health.svg)

```
[![Health](https://phpackages.com/badges/rhosocial-yii2-base-models/health.svg)](https://phpackages.com/packages/rhosocial-yii2-base-models)
```

###  Alternatives

[dmstr/yii2-migrate-command

Console Migration Command with multiple paths/aliases support

31295.5k6](/packages/dmstr-yii2-migrate-command)[dmstr/yii2-db

Database extensions

19618.8k6](/packages/dmstr-yii2-db)

PHPackages © 2026

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