PHPackages                             rauwebieten/yii-activerecord-tools - 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. rauwebieten/yii-activerecord-tools

ActiveLibrary[Database &amp; ORM](/categories/database)

rauwebieten/yii-activerecord-tools
==================================

YII2 active record tools

v1.0.7(1y ago)0414PHPPHP &gt;=7.3.0

Since Dec 1Pushed 1y ago1 watchersCompare

[ Source](https://github.com/rauwebieten/yii-activerecord-tools)[ Packagist](https://packagist.org/packages/rauwebieten/yii-activerecord-tools)[ RSS](/packages/rauwebieten-yii-activerecord-tools/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (8)Dependencies (14)Versions (9)Used By (0)

YII ActiveRecord Tools
======================

[](#yii-activerecord-tools)

Generates active record classes for YII2

This script generates model classes, and query classes for each table in the provided database. The script generates base classes which contain all functional code, and concrete classes for you to modify.

Concrete classes are never overwritten.
Base classes are overwritten when the script is ran.

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

[](#installation)

Install with composer

```
composer require rauwebieten/yii-activerecord-tools

```

Add module to your console app config

```
    ...
    'modules' => [
        'activerecord_tools' => [
            'class' => \rauwebieten\yiiactiverecordtools\ActiveRecordToolsModule::class,
            'db' => 'db',
        ],
    ],
    'bootstrap' => ['activerecord_tools'],
    ...

```

possible configuration options:

- db: the name of the database component, defaults to 'db'
- namespace: the namespace in which the classes need to generate, defaults to 'app\\models'
- baseModelClass: base class for generated active record models, defaults to ActiveRecord::class
- baseQueryClass: base class for generated qeury classes, defaults to ActiveQuery::class

Usage
-----

[](#usage)

```
php yii activerecord_tools/generate/models

```

Models are generated in your models folder. Commit and use.

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance46

Moderate activity, may be stable

Popularity15

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 88.2% 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 ~225 days

Recently: every ~234 days

Total

8

Last Release

417d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/59acbf4a62b72eba36a902011e336653854d735158432c0c3b382d95b4236589?d=identicon)[rauwebieten](/maintainers/rauwebieten)

---

Top Contributors

[![peter-kinamo](https://avatars.githubusercontent.com/u/20679429?v=4)](https://github.com/peter-kinamo "peter-kinamo (30 commits)")[![rauwebieten](https://avatars.githubusercontent.com/u/11740475?v=4)](https://github.com/rauwebieten "rauwebieten (4 commits)")

###  Code Quality

TestsCodeception

### Embed Badge

![Health badge](/badges/rauwebieten-yii-activerecord-tools/health.svg)

```
[![Health](https://phpackages.com/badges/rauwebieten-yii-activerecord-tools/health.svg)](https://phpackages.com/packages/rauwebieten-yii-activerecord-tools)
```

###  Alternatives

[yii2tech/illuminate

Yii2 to Laravel Migration Package

11315.1k](/packages/yii2tech-illuminate)[mootensai/yii2-relation-trait

Yii 2 Models load with relation, &amp; transaction save with relation

47220.3k9](/packages/mootensai-yii2-relation-trait)[nhkey/yii2-activerecord-history

Storage history of changes to ActiveRecord

46143.4k1](/packages/nhkey-yii2-activerecord-history)[dmstr/yii2-db

Database extensions

19618.8k6](/packages/dmstr-yii2-db)[spanjeta/yii2-backup

Database Backup and Restore functionality

285.0k1](/packages/spanjeta-yii2-backup)

PHPackages © 2026

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