<commit_before># Yii 2 Another Project Template

[![Latest Stable Version](https://poser.pugx.org/delagics/yii2-app-another/v/stable.svg)](https://packagist.org/packages/delagics/yii2-app-another)
[![Total Downloads](https://poser.pugx.org/delagics/yii2-app-another/downloads)](https://packagist.org/packages/delagics/yii2-app-another)
[![Latest Unstable Version](https://poser.pugx.org/delagics/yii2-app-another/v/unstable.svg)](https://packagist.org/packages/delagics/yii2-app-another)
[![Code Climate](https://codeclimate.com/github/delagics/yii2-app-another/badges/gpa.svg)](https://codeclimate.com/github/delagics/yii2-app-another)
[![License](https://poser.pugx.org/delagics/yii2-app-another/license.svg)](https://packagist.org/packages/delagics/yii2-app-another)
[![Yii2](https://img.shields.io/badge/Powered_by-Yii_Framework-green.svg?style=flat)](http://www.yiiframework.com/extension/yii2-app-another)

Yii 2 Another Project Template is a skeleton [Yii 2](http://www.yiiframework.com/) application best for
developing complex Web applications with multiple tiers.

The template includes three tiers: front, back, and console, each of which
is a separate Yii application.

The template is designed to work in a team development environment. It supports
deploying the application in different environments.

## What's inside:

- Improved project structure (see [Directory structure](#directory-structure));
- Language management through URLs with help of [codemix/yii2-localeurls](https://github.com/codemix/yii2-localeurls);
- Flexible user registration and authentication module ([dektrium/yii2-user](https://github.com/dektrium/yii2-user));
- RBAC management module ([dektrium/yii2-rbac](https://github.com/dektrium/yii2-rbac));
- `yii init` console command which simplifies project preparation;
- [PHP dotenv](https://github.com/vlucas/phpdotenv) support, for easier project configuration, with Laravel like environment variable getter: `env('YII_ENV', 'dev')`;

> **Note**: tests are currently not included.

## Requirements

The minimum requirement by this project template is that your Web server supports PHP 5.4.0.
Recommended is PHP 7.

## Installation

### Install using `composer`

If you do not have [Composer](http://getcomposer.org/), follow the instructions in the
[Installing Yii](https://github.com/yiisoft/yii2/blob/master/docs/guide/start-installation.md#installing-via-composer) section of the definitive guide to install it.

With Composer installed, you can then install the application using the following commands:

    composer global require "fxp/composer-asset-plugin:~1.1.3"
    composer create-project --prefer-dist delagics/yii2-app-another another.dev

The first command installs the [composer asset plugin](https://github.com/francoispluchino/composer-asset-plugin/)
which allows managing bower and npm package dependencies through Composer. You only need to run this command
once for all. The second command installs the _another_ application in a directory named `another.dev`.
You can choose a different directory name if you want.

Then follow the instructions given in the [Preparing application](#preparing-application) section.

### Install with `git`

Clone repository as a web root.
```
git clone git@github.com:delagics/yii2-app-another.git another.dev
```

> Directory named `another.dev` is your Web root.

Then install the [composer asset plugin](https://github.com/francoispluchino/composer-asset-plugin/),
go to the web root folder in a console terminal and run `composer install`:

```
composer global require "fxp/composer-asset-plugin:~1.1.3"

cd /var/www/another.dev
composer install
```

Then follow the instructions given in the [Preparing application](#preparing-application) section.

## Preparing application

After you install the application, you have to conduct the following steps to initialize
the installed application. You only need to do these once for all.

1.  Create a new database.

2.  Open a console terminal in the root directory of your project and execute the `php yii init/environment && php yii init/initialize` command,
and follow the steps of the script.
<commit_msg>Updated recommended version of Composer Asset plugin in docs<commit_after># Yii 2 Another Project Template

[![Latest Stable Version](https://poser.pugx.org/delagics/yii2-app-another/v/stable.svg)](https://packagist.org/packages/delagics/yii2-app-another)
[![Total Downloads](https://poser.pugx.org/delagics/yii2-app-another/downloads)](https://packagist.org/packages/delagics/yii2-app-another)
[![Latest Unstable Version](https://poser.pugx.org/delagics/yii2-app-another/v/unstable.svg)](https://packagist.org/packages/delagics/yii2-app-another)
[![Code Climate](https://codeclimate.com/github/delagics/yii2-app-another/badges/gpa.svg)](https://codeclimate.com/github/delagics/yii2-app-another)
[![License](https://poser.pugx.org/delagics/yii2-app-another/license.svg)](https://packagist.org/packages/delagics/yii2-app-another)
[![Yii2](https://img.shields.io/badge/Powered_by-Yii_Framework-green.svg?style=flat)](http://www.yiiframework.com/extension/yii2-app-another)

Yii 2 Another Project Template is a skeleton [Yii 2](http://www.yiiframework.com/) application best for
developing complex Web applications with multiple tiers.

The template includes three tiers: front, back, and console, each of which
is a separate Yii application.

The template is designed to work in a team development environment. It supports
deploying the application in different environments.

## What's inside:

- Improved project structure (see [Directory structure](#directory-structure));
- Language management through URLs with help of [codemix/yii2-localeurls](https://github.com/codemix/yii2-localeurls);
- Flexible user registration and authentication module ([dektrium/yii2-user](https://github.com/dektrium/yii2-user));
- RBAC management module ([dektrium/yii2-rbac](https://github.com/dektrium/yii2-rbac));
- `yii init` console command which simplifies project preparation;
- [PHP dotenv](https://github.com/vlucas/phpdotenv) support, for easier project configuration, with Laravel like environment variable getter: `env('YII_ENV', 'dev')`;

> **Note**: tests are currently not included.

## Requirements

The minimum requirement by this project template is that your Web server supports PHP 5.4.0.
Recommended is PHP 7.

## Installation

### Install using `composer`

If you do not have [Composer](http://getcomposer.org/), follow the instructions in the
[Installing Yii](https://github.com/yiisoft/yii2/blob/master/docs/guide/start-installation.md#installing-via-composer) section of the definitive guide to install it.

With Composer installed, you can then install the application using the following commands:

    composer global require "fxp/composer-asset-plugin:~1.2"
    composer create-project --prefer-dist delagics/yii2-app-another another.dev

The first command installs the [composer asset plugin](https://github.com/francoispluchino/composer-asset-plugin/)
which allows managing bower and npm package dependencies through Composer. You only need to run this command
once for all. The second command installs the _another_ application in a directory named `another.dev`.
You can choose a different directory name if you want.

Then follow the instructions given in the [Preparing application](#preparing-application) section.

### Install with `git`

Clone repository as a web root.
```
git clone git@github.com:delagics/yii2-app-another.git another.dev
```

> Directory named `another.dev` is your Web root.

Then install the [composer asset plugin](https://github.com/francoispluchino/composer-asset-plugin/),
go to the web root folder in a console terminal and run `composer install`:

```
composer global require "fxp/composer-asset-plugin:~1.2"

cd /var/www/another.dev
composer install
```

Then follow the instructions given in the [Preparing application](#preparing-application) section.

## Preparing application

After you install the application, you have to conduct the following steps to initialize
the installed application. You only need to do these once for all.

1.  Create a new database.

2.  Open a console terminal in the root directory of your project and execute the `php yii init/environment && php yii init/initialize` command,
and follow the steps of the script.

{'fraction_non_alphanumeric': 0.11258833393220745, 'fraction_numerical': 0.00838423763324949, 'mean_word_length': 5.153279292557111, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 36, 'lorem ipsum': 0, 'www.': 6, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3121074', 'n_tokens_mistral': 2600, 'n_tokens_neox': 2477, 'n_words': 762}