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.6k↑100%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 1mo ago

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

30

—

LowBetter than 64% of packages

Maintenance17

Infrequent updates — may be unmaintained

Popularity30

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

3710d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1f6369b8297cabff72e4417f4095d12bb95450a4f3f0373120c6e3e0a3a1b1f4?d=identicon)[kossmoss](/maintainers/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

[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)[urbanindo/yii2-dynamodb

DynamoDB extensions for Yii2

1471.4k](/packages/urbanindo-yii2-dynamodb)[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)
