PHPackages                             kossmoss/yii2-postgresql-array-field - 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. kossmoss/yii2-postgresql-array-field

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

kossmoss/yii2-postgresql-array-field
====================================

Yii2 postgresql array field support behavior

0.2.1(10y ago)629.8k↑83.3%4[1 issues](https://github.com/kossmoss/yii2-postgresql-array-field/issues)MITPHPPHP &gt;=5.4.0

Since Feb 15Pushed 10y ago1 watchersCompare

[ Source](https://github.com/kossmoss/yii2-postgresql-array-field)[ Packagist](https://packagist.org/packages/kossmoss/yii2-postgresql-array-field)[ RSS](/packages/kossmoss-yii2-postgresql-array-field/feed)WikiDiscussions master Synced today

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

yii2-postgresql-array-field
===========================

[](#yii2-postgresql-array-field)

Yii2 postgresql array field support behavior

================

Provides PostgreSQL array fields support for yii2 models.

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

[](#installation)

Add a dependency to your project's composer.json:

```
{
	"require": {
		"kossmoss/yii2-postgresql-array-field": "^0.2"
	}
}
```

Usage example
-------------

[](#usage-example)

#### Attach behavior to one or more fields of your model

[](#attach-behavior-to-one-or-more-fields-of-your-model)

```
use yii\db\ActiveRecord;
use \kossmoss\PostgresqlArrayField\PostgresqlArrayFieldBehavior;

/**
 * @property array $modelField
 */
class Model extends ActiveRecord{
	public function behaviors() {
		return [
			[
				'class' => PostgresqlArrayFieldBehavior::className(),
				'arrayFieldName' => 'modelField', // model's field to attach behavior
				'onEmptySaveNull' => true // if set to false, empty array will be saved as empty PostreSQL array '{}' (default: true)
			]
		];
	}
}
```

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance17

Infrequent updates — may be unmaintained

Popularity33

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity50

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

Total

3

Last Release

3756d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/966478?v=4)[Konstantin Petrov](/maintainers/kossmoss)[@kossmoss](https://github.com/kossmoss)

---

Top Contributors

[![kossmoss](https://avatars.githubusercontent.com/u/966478?v=4)](https://github.com/kossmoss "kossmoss (10 commits)")

### Embed Badge

![Health badge](/badges/kossmoss-yii2-postgresql-array-field/health.svg)

```
[![Health](https://phpackages.com/badges/kossmoss-yii2-postgresql-array-field/health.svg)](https://phpackages.com/packages/kossmoss-yii2-postgresql-array-field)
```

###  Alternatives

[craftcms/cms

Craft CMS

3.6k3.6M3.1k](/packages/craftcms-cms)[bizley/migration

Migration generator for Yii 2.

296389.5k11](/packages/bizley-migration)[yii2tech/illuminate

Yii2 to Laravel Migration Package

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

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

49232.7k9](/packages/mootensai-yii2-relation-trait)

PHPackages © 2026

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