PHPackages                             katoba86/yii2-configuration - 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. katoba86/yii2-configuration

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

katoba86/yii2-configuration
===========================

Configuration kit for Yii applications

1.1(6y ago)012BSD-3-ClausePHPPHP &gt;=7.1

Since Feb 24Pushed 6y ago1 watchersCompare

[ Source](https://github.com/katoba86/yii2-configtool)[ Packagist](https://packagist.org/packages/katoba86/yii2-configuration)[ Docs](https://fahrplan-bus-bahn.de)[ RSS](/packages/katoba86-yii2-configuration/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (4)Versions (3)Used By (0)

[![Build Status](https://camo.githubusercontent.com/3d91bd7af8e18078f6a3b050fa08a889fb499c68e6bf47f71f1c3f86ce4f25f4/68747470733a2f2f7472617669732d63692e636f6d2f6b61746f626138362f796969322d636f6e66696775726174696f6e2e7376673f6272616e63683d6d6173746572)](https://travis-ci.com/katoba86/yii2-configuration)

Yii2 ConfigKit
==============

[](#yii2-configkit)

Yii2 Flexible Configuration Tool
--------------------------------

[](#yii2-flexible-configuration-tool)

Yii2-ConfigKit 1.0 slightly modified

Dependencies on Composer have been adapted to the latest version of league/container.

Also a small basic test was implemented. Coverage not complete. Possibly to be done soon.

In order to provide ourselves a higher flexibility with the way we build templates for our Yii based projects, we built this kit. It is, in a way, the newest generation of the widely used `YiiBootstrap`, but it is so much better structured and less complex than the previously mentioned was.

As we all know, Yii has a very cumbersome array configuration for its bootstrap process. The `main.php` script normally contains a lot of information in it regarding application settings, components, modules and parameters, and many times we find ourselves dealing with a huge file with settings that, even though they are ordered by keys, fails to be clear due to the amount of lines within it.

ConfigKit tries to solve that issue, allowing us to create project templates with a different bootstrap and configuration building process. It proposes the following configuration folder structure:

```
config
├── codeception [ application name that contains its configuration ]
|   ├── app.php
├── console [ application name ]
|   |
|   ├── components
|   ├── params
|   └──app.php [ app.php contains simple attribute configuration ]
|
└── web [ application name ]
    |
    ├── components [ main section on configuration ]
    |   ├── cache.php [ the name of the file, is the name of the component ]
    |   ├── db.php  [ the contents of the file, are the settings of the component ]
    |   └── log.php
    ├── params  [ main section on app configuration ]
    |   └── mail.php
    └── app.php

```

Please, keep in mind that the above configuration folder structure is really up to you. `ConfigKit` requires a `ConfigurationBuilder` that you are responsible to develop and it can have the above recommendation or another one. For an example of a `ConfigurationBuilder` please visit

Config File Examples
--------------------

[](#config-file-examples)

### Example of app.php

[](#example-of-appphp)

```
