PHPackages                             sidekit/config - 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. sidekit/config

Abandoned → [2amigos/yii2-config-kit](/?search=2amigos%2Fyii2-config-kit)ArchivedExtension[Utility &amp; Helpers](/categories/utility)

sidekit/config
==============

Configuration kit for Yii applications

2.0.1(7y ago)232.6k11BSD-3-ClausePHPPHP &gt;=7.0

Since Dec 30Pushed 5y ago17 watchersCompare

[ Source](https://github.com/2amigos/yii2-config-kit)[ Packagist](https://packagist.org/packages/sidekit/config)[ Docs](https://2amigos.us/)[ RSS](/packages/sidekit-config/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (8)Versions (7)Used By (0)

ConfigKit
=========

[](#configkit)

[![Packagist Version](https://camo.githubusercontent.com/10e0b6e248ef3af48b8ecbb00663f6cade83ada9eb36bca25cdd31c48dde019a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f32616d69676f732f796969322d636f6e6669672d6b69742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/2amigos/yii2-config-kit)[![Latest Stable Version](https://camo.githubusercontent.com/ddb44bd9c9969576f7ea3a36f8d31df12bc66969d178ef4131a1b965c53fecd5/68747470733a2f2f706f7365722e707567782e6f72672f32616d69676f732f796969322d636f6e6669672d6b69742f76657273696f6e)](https://packagist.org/packages/2amigos/yii2-config-kit)[![Total Downloads](https://camo.githubusercontent.com/7e11fbd4ae4bb9ce08325552e3f144cb6a46f8c152e3842165dcea3ec790190b/68747470733a2f2f706f7365722e707567782e6f72672f32616d69676f732f796969322d636f6e6669672d6b69742f646f776e6c6f616473)](https://packagist.org/packages/2amigos/yii2-config-kit)

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)

```
