Download the PHP package 2amigos/yii2-config-kit without Composer

On this page you can find all versions of the php package 2amigos/yii2-config-kit. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package yii2-config-kit

ConfigKit

Packagist Version Latest Stable Version Total Downloads

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:

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 https://github.com/sidekit/yii2-app-template/blob/master/src/App/Configuration/ConfigurationBuilder.php

Config File Examples

Example of app.php

Example of a component file: db.php

Environment Settings Overrides

We know how important settings for different environments are , such as: test, local, stage and prod environments. The proposed solution to dealing with them is as simple as adding a config folder with the name of the environment needed that has the same structure within, as the previously mentioned the folder. We never found ourselves having to clone the entire structure, so you can just simply place in it the files that contains the settings you wish to override.

Bootstrapping

We believe that application bootstrapping should also be as structured as its configuration. That way, all processes are much clear and easier to manage and scale. In the Yii 2 proposed project's template https://github.com/2amigos/yii2-app-template you can see a working sample of ConfigKit library + a proposed bootstrapping process. The following is the startup process of a web application:

Clean code

We have added some development tools for you to contribute to the library with clean code:

And you should use them in that order.

Using php mess detector

Sample with all options available:

Using code sniffer

Using code fixer

We have added a PHP code fixer to standardize our code. It includes Symfony, PSR2 and some contributors rules.

Testing

2amigOS!


All versions of yii2-config-kit with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0
league/container Version ^2.2
vlucas/phpdotenv Version ^2.4
symfony/finder Version ^3.1
symfony/console Version ~2.8|~3.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package 2amigos/yii2-config-kit contains the following files

Loading the files please wait ....