PHPackages                             schmunk42/relation - 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. schmunk42/relation

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

schmunk42/relation
==================

Yii Framework components for active record relations

1.1.0(12y ago)78.0k4[1 issues](https://github.com/schmunk42/yii-relation/issues)4BSD-3-ClausePHPPHP &gt;=5.3.0

Since Aug 15Pushed 12y ago2 watchersCompare

[ Source](https://github.com/schmunk42/yii-relation)[ Packagist](https://packagist.org/packages/schmunk42/relation)[ RSS](/packages/schmunk42-relation/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (1)Dependencies (1)Versions (7)Used By (4)

Relation
========

[](#relation)

- `GtcSaveRelationsBehavior` saves related records.
- `GtcRelation` displays an input widget for relations.

*These components were originally part of the gii-template-collection, credits to [thyseus](https://github.com/thyseus/)*

Usage
-----

[](#usage)

### composer autoloading

[](#composer-autoloading)

Just prepend a backslash to trigger the composer autoloader, requires `Yii 1.1.14`.

`\GtcSaveRelationsBehavior`

### Yii autoloading

[](#yii-autoloading)

Import the component in your application configuration:

```
'import'     => array(
  'vendor.schmunk42.relation.behaviors.*',
)

```

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance17

Infrequent updates — may be unmaintained

Popularity26

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 90.9% 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 ~62 days

Recently: every ~78 days

Total

6

Last Release

4390d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3b4ab2b6685ec71887908ec8cff261a16cd5bb24c69bb8ab52840e220f175f9d?d=identicon)[schmunk](/maintainers/schmunk)

---

Top Contributors

[![schmunk42](https://avatars.githubusercontent.com/u/649031?v=4)](https://github.com/schmunk42 "schmunk42 (10 commits)")[![motin](https://avatars.githubusercontent.com/u/793037?v=4)](https://github.com/motin "motin (1 commits)")

---

Tags

recordyiiactiverelations

### Embed Badge

![Health badge](/badges/schmunk42-relation/health.svg)

```
[![Health](https://phpackages.com/badges/schmunk42-relation/health.svg)](https://phpackages.com/packages/schmunk42-relation)
```

###  Alternatives

[owen-it/laravel-auditing

Audit changes of your Eloquent models in Laravel

3.4k35.4M145](/packages/owen-it-laravel-auditing)[yiiext/activerecord-relation-behavior

Inspired by and put together the awesomeness of many yii extensions that aim to improve saving of related records. Comes with 100% test coverage and well structured and clean code so it can savely be used in enterprise production enviroment.

9336.9k](/packages/yiiext-activerecord-relation-behavior)[yiiext/migrate-command

This is an enhanced version of the Yii Database Migration Tool that adds module support and many more usefull features.

34174.8k4](/packages/yiiext-migrate-command)[schmunk42/database-command

Yii command to create database migrations from existing schema

185.9k](/packages/schmunk42-database-command)

PHPackages © 2026

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