PHPackages                             razonyang/yii2-setting - 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. razonyang/yii2-setting

ActiveYii2-extension[Utility &amp; Helpers](/categories/utility)

razonyang/yii2-setting
======================

Yii2 Setting Manager

1.0.0(6y ago)64.0k1BSD-3-ClausePHPPHP ^7.1

Since Aug 21Pushed 6y ago1 watchersCompare

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

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

Yii2 Setting Manager
====================

[](#yii2-setting-manager)

[![Build Status](https://camo.githubusercontent.com/50bd6eee28731d11f6e3e10d1ed016c4aaf019ba1d11a8e899b97ec293f3b222/68747470733a2f2f7472617669732d63692e6f72672f72617a6f6e79616e672f796969322d73657474696e672e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/razonyang/yii2-setting)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/320e44b6eaa7b00bf2eba303828307a0fd6d69029dc8c482a8bc8c2f7b616e54/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f72617a6f6e79616e672f796969322d73657474696e672f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/razonyang/yii2-setting/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/2e2ec0d6af933f8107b23e447caf17ec0dbdb9de7b09b2b69c474f870e79d545/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f72617a6f6e79616e672f796969322d73657474696e672f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/razonyang/yii2-setting/?branch=master)[![Latest Stable Version](https://camo.githubusercontent.com/fc872ee4f0b66aba7b76d2d398fa100899c57c7f632cbb5fc90d2c262d595ca2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f72617a6f6e79616e672f796969322d73657474696e672e737667)](https://packagist.org/packages/razonyang/yii2-setting)[![Total Downloads](https://camo.githubusercontent.com/d9f8d24f5afefe760da291c5ec625cabf47d5ca5fc7f01d3c4d029867df48035/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f72617a6f6e79616e672f796969322d73657474696e672e737667)](https://packagist.org/packages/razonyang/yii2-setting)[![LICENSE](https://camo.githubusercontent.com/e21602d10fa3956b48c275d550027783e6e18394ebf0a091a74d345596f3fcd7/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f72617a6f6e79616e672f796969322d73657474696e67)](LICENSE)

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

[](#installation)

```
composer require razonyang/yii2-setting

```

Usage
-----

[](#usage)

Configuration:

```
return [
    // console
    'controllerMap' => [
        'migrate' => [
            'migrationNamespaces' => [
                'RazonYang\Yii2\Setting\Migration',
            ],
        ],
    ],

    'components' => [
        // common
        'settingManager' => [
            'class' => \RazonYang\Yii2\Setting\DbManager::class,
            'enableCache' => YII_DEBUG ? false : true,
            'cache' => 'cache',
            'mutex' => 'mutex',
            'duration' => 600,
            'db' => 'db',
            'settingTable' => '{{%setting}}',
        ],
    ],
];
```

Migration:

```
$ yii migrate

```

```
$settingManager = Yii::$app->get('settingManager');

// fetch by ID
$value = $settingManager->get($id, $defaultValue); // defaultValue is optional

// fetchs all settings
$settings = $settingManager->getAll();

// flush cache
$settingManager->flushCache();
```

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity53

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

Unknown

Total

1

Last Release

2456d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/17720932?v=4)[Razon Yang](/maintainers/RazonYang)[@razonyang](https://github.com/razonyang)

---

Top Contributors

[![razonyang](https://avatars.githubusercontent.com/u/17720932?v=4)](https://github.com/razonyang "razonyang (1 commits)")

---

Tags

yii2extensionsetting manager

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/razonyang-yii2-setting/health.svg)

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

###  Alternatives

[vyants/yii2-daemon

Extension provides functionality for simple daemons creation and control

7859.0k](/packages/vyants-yii2-daemon)[dmstr/yii2-cookie-consent

Yii2 Cookie Consent Widget

1452.6k](/packages/dmstr-yii2-cookie-consent)[richardfan1126/yii2-js-register

Yii2 widget to register JS into view

1357.2k7](/packages/richardfan1126-yii2-js-register)

PHPackages © 2026

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