PHPackages                             pozitronik/yii2-relations - 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. pozitronik/yii2-relations

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

pozitronik/yii2-relations
=========================

Relational attributes support for YII2 ActiveRecord

111021(4y ago)13.7k3[3 issues](https://github.com/pozitronik/yii2-relations/issues)1GPL-3.0PHPPHP &gt;=7.4CI passing

Since Oct 11Pushed 10mo ago1 watchersCompare

[ Source](https://github.com/pozitronik/yii2-relations)[ Packagist](https://packagist.org/packages/pozitronik/yii2-relations)[ RSS](/packages/pozitronik-yii2-relations/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (2)Versions (12)Used By (1)

Yii2-relations
==============

[](#yii2-relations)

Поддержка атрибутов ActiveRecord, задаваемых через связи.

[![Build Status](https://camo.githubusercontent.com/a657f4a80184d05cddeb6d77273e6c30c631e5317529a908b3135b77ba55b221/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f706f7a6974726f6e696b2f796969322d72656c6174696f6e732f63692e796d6c3f6272616e63683d6d6173746572)](https://camo.githubusercontent.com/a657f4a80184d05cddeb6d77273e6c30c631e5317529a908b3135b77ba55b221/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f706f7a6974726f6e696b2f796969322d72656c6174696f6e732f63692e796d6c3f6272616e63683d6d6173746572)

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

[](#installation)

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

Run

```
php composer.phar require pozitronik/yii2-relations "dev-master"

```

or add

```
"pozitronik/yii2-relations": "dev-master"

```

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

Requirements
------------

[](#requirements)

PHP &gt;= 8.0

Usage
-----

[](#usage)

### Idea

[](#idea)

### Migrations

[](#migrations)

### Configuration

[](#configuration)

### Validations

[](#validations)

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 99% 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 ~199 days

Recently: every ~242 days

Total

8

Last Release

329d ago

PHP version history (2 changes)111021PHP &gt;=7.4

1.0.0PHP &gt;=8.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2357892?v=4)[Pavel Dubrovsky](/maintainers/pozitronik)[@pozitronik](https://github.com/pozitronik)

---

Top Contributors

[![pozitronik](https://avatars.githubusercontent.com/u/2357892?v=4)](https://github.com/pozitronik "pozitronik (95 commits)")[![pepebotika69](https://avatars.githubusercontent.com/u/14938095?v=4)](https://github.com/pepebotika69 "pepebotika69 (1 commits)")

---

Tags

traityii2activerecordrelation

### Embed Badge

![Health badge](/badges/pozitronik-yii2-relations/health.svg)

```
[![Health](https://phpackages.com/badges/pozitronik-yii2-relations/health.svg)](https://phpackages.com/packages/pozitronik-yii2-relations)
```

###  Alternatives

[mootensai/yii2-relation-trait

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

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

Storage history of changes to ActiveRecord

46148.8k1](/packages/nhkey-yii2-activerecord-history)[yii-dream-team/yii2-lockable-activerecord

Pessimistic locking behavior for Yii2 ActiveRecord

1888.8k](/packages/yii-dream-team-yii2-lockable-activerecord)[bephp/activerecord

micro activerecord library in PHP(only 400 lines with comments), support chain calls and relations(HAS\_ONE, HAS\_MANY, BELONGS\_TO).

1202.1k2](/packages/bephp-activerecord)[spinitron/yii2-dynamic-ar

Extends Yii ActiveRecord for Maria Dynamic Columns

577.0k](/packages/spinitron-yii2-dynamic-ar)[jlorente/yii2-activerecord-inheritance

ActiveRecord Inheritance is an util to provide the Class Table Inheritance Pattern the to the Yii2 framework. It fakes inheritance between two ActiveRecord classes.

184.2k](/packages/jlorente-yii2-activerecord-inheritance)

PHPackages © 2026

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