PHPackages                             atellitech/utils-yii2 - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. atellitech/utils-yii2

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

atellitech/utils-yii2
=====================

Utilities for Yii2

1.4.2(1y ago)01.2k11MITPHPPHP &gt;=8.0

Since Sep 16Pushed 1y ago1 watchersCompare

[ Source](https://github.com/AtelliTech/utils-yii2)[ Packagist](https://packagist.org/packages/atellitech/utils-yii2)[ Docs](https://github.com/AtelliTech/utils-yii2)[ RSS](/packages/atellitech-utils-yii2/feed)WikiDiscussions main Synced yesterday

READMEChangelog (10)Dependencies (4)Versions (13)Used By (1)

Utils for Yii2
==============

[](#utils-for-yii2)

The utilities for Yii2

Getting Start
-------------

[](#getting-start)

### Requirements

[](#requirements)

- php8.0+

### Install

[](#install)

```
$ /lib/path/composer require atellitech/utils-yii2

```

Model Generator
---------------

[](#model-generator)

This generator is used to create model class by particular table name.

### Getting Start

[](#getting-start-1)

#### Add controllerMap into config file of console.

[](#add-controllermap-into-config-file-of-console)

```
...
"controllerMap": [
    'genmodel' => [
        'class' => 'AtelliTech\Yii2\Utils\ModelGeneratorController',
        'db' => 'db', // db comopnent id default: db
        'path' => '@app/models', // store path of model class file default: @app/models
        'namespace' => 'app\models', // namespace of model class default: app\models
    ],
]

```

#### Usage

[](#usage)

```
$ /path/to/yii genmodel {tableName} --option=value...

```

#### Options

[](#options)

- db Database component id
- path Store path of model class file
- ns Namespace of model class

Module Generator
----------------

[](#module-generator)

This genertor is used to create related files of API module by name that will create files into @app/modules/{name}.

### Getting Start

[](#getting-start-2)

#### Add controllerMap into config file of console.

[](#add-controllermap-into-config-file-of-console-1)

```
...
"controllerMap": [
    'genapi' => [
        'class' => 'AtelliTech\Yii2\Utils\ApiGeneratorController',
        'db' => 'db' // db comopnent id default: db
    ],
]

```

#### Usage

[](#usage-1)

```
$ /path/to/yii genapi/generate-module --name={moduleName}

```

API Generator
-------------

[](#api-generator)

This genertor is used to create an API controller file into specific module name by particular table name.

### Getting Start

[](#getting-start-3)

#### Add controllerMap into config file of console.

[](#add-controllermap-into-config-file-of-console-2)

```
...
"controllerMap": [
    'genapi' => [
        'class' => 'AtelliTech\Yii2\Utils\ApiGeneratorController',
        'db' => 'db' // db comopnent id default: db
    ],
]

```

#### Usage

[](#usage-2)

```
$ /path/to/yii genapi {tableName} --option=value

```

#### Options

[](#options-1)

- name Name of module

Container definition Dumper
---------------------------

[](#container-definition-dumper)

Dump service and repository files to definitions of container file

### Getting Start

[](#getting-start-4)

#### Add controllerMap into config file of console.

[](#add-controllermap-into-config-file-of-console-3)

```
...
"controllerMap": [
    'container' => [
        'class' => 'AtelliTech\Yii2\Utils\ContainerController'
    ],
]

```

#### Usage

[](#usage-3)

```
$ /path/to/yii container/definitions --srcPath={srcPath} --destPath={destPath} --srcNs={srcNs} --suffix={suffix}

```

JsonFileLogTarge
----------------

[](#jsonfilelogtarge)

Support exporting log in JSON.

Note: this class is extending yii\\log\\FileTarget

### Getting Start

[](#getting-start-5)

#### Add to config file

[](#add-to-config-file)

```
...
'log' => [
        'traceLevel' => YII_DEBUG ? 3 : 0,
        'targets' => [
            [
                'class' => 'AtelliTech\Yii2\Utils\Log\JsonFileLogTarget',
                'levels' => ['error', 'warning'],
                'logFile' => '@app/runtime/logs/web.log',
            ],
        ],
    ],

```

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance47

Moderate activity, may be stable

Popularity17

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity56

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

Recently: every ~103 days

Total

12

Last Release

392d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/123725472?v=4)[AtelliTech](/maintainers/atellitech)[@AtelliTech](https://github.com/AtelliTech)

---

Top Contributors

[![iamgold](https://avatars.githubusercontent.com/u/19813333?v=4)](https://github.com/iamgold "iamgold (42 commits)")

---

Tags

yii2utilities

###  Code Quality

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/atellitech-utils-yii2/health.svg)

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

###  Alternatives

[craftcms/cms

Craft CMS

3.6k3.6M3.1k](/packages/craftcms-cms)[kartik-v/yii2-helpers

A collection of useful helper functions for Yii Framework 2.0

933.1M29](/packages/kartik-v-yii2-helpers)

PHPackages © 2026

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