PHPackages                             strongsquirrel/yii2-dotenv-app - 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. [Framework](/categories/framework)
4. /
5. strongsquirrel/yii2-dotenv-app

ActiveProject[Framework](/categories/framework)

strongsquirrel/yii2-dotenv-app
==============================

Yii 2 Basic Project Template

2.0.13(8y ago)461BSD-3-ClausePHPPHP &gt;=5.4.0

Since Dec 1Pushed 8y ago2 watchersCompare

[ Source](https://github.com/StrongSquirrel/yii2-dotenv-app)[ Packagist](https://packagist.org/packages/strongsquirrel/yii2-dotenv-app)[ Docs](http://www.yiiframework.com/)[ RSS](/packages/strongsquirrel-yii2-dotenv-app/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (9)Versions (17)Used By (0)

 [ ![](https://avatars0.githubusercontent.com/u/993323) ](https://github.com/yiisoft)

Yii 2 Basic Project Template
============================

[](#yii-2-basic-project-template)

Yii 2 Basic Project Template is a skeleton [Yii 2](http://www.yiiframework.com/)application best for rapidly creating small projects.

The template contains the basic features including user login/logout and a contact page. It includes all commonly used configurations that would allow you to focus on adding new features to your application.

DIRECTORY STRUCTURE
-------------------

[](#directory-structure)

```
  assets/             contains assets definition
  commands/           contains console commands (controllers)
  config/             contains application configurations
  controllers/        contains Web controller classes
  helpers/            contains helper functions
  mail/               contains view files for e-mails
  models/             contains model classes
  runtime/            contains files generated during runtime
  tests/              contains various tests for the basic application
  vendor/             contains dependent 3rd-party packages
  views/              contains view files for the Web application
  web/                contains the entry script and Web resources

```

REQUIREMENTS
------------

[](#requirements)

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

INSTALLATION
------------

[](#installation)

### Install via Composer

[](#install-via-composer)

If you do not have [Composer](http://getcomposer.org/), you may install it by following the instructions at [getcomposer.org](http://getcomposer.org/doc/00-intro.md#installation-nix).

You can then install this project template using the following command:

```
$ php composer.phar global require "fxp/composer-asset-plugin:~1.4.2"
$ git clone git@github.com:StrongSquirrel/yii2-dotenv-app.git project_name
$ cd project_name
$ php composer.phar install
```

CONFIGURATION
-------------

[](#configuration)

Set up env variables in .env file:

```
$ cd project_name
$ cp .env.example .env
```

```
DB_DSN=mysql:host=localhost;dbname=yii2basic
DB_USERNAME=root
DB_PASSWORD=
YII_DEBUG=true
YII_ENV=prod
COOKIE_VALIDATION_KEY=

```

**NOTES:**

- Yii won't create the database for you, this has to be done manually before you can access it.
- Check and edit the other files in the `config/` directory to customize your application as required.
- Refer to the README in the `tests` directory for information specific to basic application tests.

TESTING
-------

[](#testing)

Tests are located in `tests` directory. They are developed with [Codeception PHP Testing Framework](http://codeception.com/). By default there are 3 test suites:

- `unit`
- `functional`
- `acceptance`

Tests can be executed by running

```
vendor/bin/codecept run

```

The command above will execute unit and functional tests. Unit tests are testing the system components, while functional tests are for testing user interaction. Acceptance tests are disabled by default as they require additional setup since they perform testing in real browser.

### Running acceptance tests

[](#running--acceptance-tests)

To execute acceptance tests do the following:

1. Rename `tests/acceptance.suite.yml.example` to `tests/acceptance.suite.yml` to enable suite configuration
2. Replace `codeception/base` package in `composer.json` with `codeception/codeception` to install full featured version of Codeception
3. Update dependencies with Composer

    ```
    composer update

    ```
4. Download [Selenium Server](http://www.seleniumhq.org/download/) and launch it:

    ```
    java -jar ~/selenium-server-standalone-x.xx.x.jar

    ```

    In case of using Selenium Server 3.0 with Firefox browser since v48 or Google Chrome since v53 you must download [GeckoDriver](https://github.com/mozilla/geckodriver/releases) or [ChromeDriver](https://sites.google.com/a/chromium.org/chromedriver/downloads) and launch Selenium with it:

    ```
    # for Firefox
    java -jar -Dwebdriver.gecko.driver=~/geckodriver ~/selenium-server-standalone-3.xx.x.jar

    # for Google Chrome
    java -jar -Dwebdriver.chrome.driver=~/chromedriver ~/selenium-server-standalone-3.xx.x.jar

    ```

    As an alternative way you can use already configured Docker container with older versions of Selenium and Firefox:

    ```
    docker run --net=host selenium/standalone-firefox:2.53.0

    ```
5. (Optional) Create `yii2_basic_tests` database and update it by applying migrations if you have them.

    ```
    tests/bin/yii migrate

    ```

    The database configuration can be found at `config/test_db.php`.
6. Start web server:

    ```
    tests/bin/yii serve

    ```
7. Now you can run all available tests

    ```
    # run all available tests
    vendor/bin/codecept run

    # run acceptance tests
    vendor/bin/codecept run acceptance

    # run only unit and functional tests
    vendor/bin/codecept run unit,functional

    ```

### Code coverage support

[](#code-coverage-support)

By default, code coverage is disabled in `codeception.yml` configuration file, you should uncomment needed rows to be able to collect code coverage. You can run your tests and collect coverage with the following command:

```
#collect coverage for all tests
vendor/bin/codecept run -- --coverage-html --coverage-xml

#collect coverage only for unit tests
vendor/bin/codecept run unit -- --coverage-html --coverage-xml

#collect coverage for unit and functional tests
vendor/bin/codecept run functional,unit -- --coverage-html --coverage-xml

```

You can see code coverage output under the `tests/_output` directory.

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community22

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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

Every ~95 days

Recently: every ~120 days

Total

16

Last Release

3110d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b5764b62d1883e2d0b0a733646c2dbc220cd825d62d7f33c8c5d571b62516c3c?d=identicon)[kotchuprik](/maintainers/kotchuprik)

---

Top Contributors

[![qiangxue](https://avatars.githubusercontent.com/u/993322?v=4)](https://github.com/qiangxue "qiangxue (147 commits)")[![samdark](https://avatars.githubusercontent.com/u/47294?v=4)](https://github.com/samdark "samdark (110 commits)")[![cebe](https://avatars.githubusercontent.com/u/189796?v=4)](https://github.com/cebe "cebe (78 commits)")[![Ragazzo](https://avatars.githubusercontent.com/u/1748844?v=4)](https://github.com/Ragazzo "Ragazzo (36 commits)")[![SilverFire](https://avatars.githubusercontent.com/u/4499203?v=4)](https://github.com/SilverFire "SilverFire (16 commits)")[![maximal](https://avatars.githubusercontent.com/u/980679?v=4)](https://github.com/maximal "maximal (13 commits)")[![DavertMik](https://avatars.githubusercontent.com/u/220264?v=4)](https://github.com/DavertMik "DavertMik (13 commits)")[![schmunk42](https://avatars.githubusercontent.com/u/649031?v=4)](https://github.com/schmunk42 "schmunk42 (8 commits)")[![creocoder](https://avatars.githubusercontent.com/u/896494?v=4)](https://github.com/creocoder "creocoder (7 commits)")[![lucianobaraglia](https://avatars.githubusercontent.com/u/374554?v=4)](https://github.com/lucianobaraglia "lucianobaraglia (6 commits)")[![damasco](https://avatars.githubusercontent.com/u/1377554?v=4)](https://github.com/damasco "damasco (5 commits)")[![githubjeka](https://avatars.githubusercontent.com/u/874234?v=4)](https://github.com/githubjeka "githubjeka (5 commits)")[![chuprik](https://avatars.githubusercontent.com/u/802946?v=4)](https://github.com/chuprik "chuprik (4 commits)")[![slavcodev](https://avatars.githubusercontent.com/u/757721?v=4)](https://github.com/slavcodev "slavcodev (4 commits)")[![pana1990](https://avatars.githubusercontent.com/u/6630197?v=4)](https://github.com/pana1990 "pana1990 (4 commits)")[![ivanlemeshev](https://avatars.githubusercontent.com/u/2150567?v=4)](https://github.com/ivanlemeshev "ivanlemeshev (3 commits)")[![mohorev](https://avatars.githubusercontent.com/u/4974062?v=4)](https://github.com/mohorev "mohorev (3 commits)")[![janisto](https://avatars.githubusercontent.com/u/387868?v=4)](https://github.com/janisto "janisto (2 commits)")[![numbata](https://avatars.githubusercontent.com/u/82400?v=4)](https://github.com/numbata "numbata (2 commits)")[![klimov-paul](https://avatars.githubusercontent.com/u/1482054?v=4)](https://github.com/klimov-paul "klimov-paul (2 commits)")

---

Tags

frameworkyii2project templatebasic

### Embed Badge

![Health badge](/badges/strongsquirrel-yii2-dotenv-app/health.svg)

```
[![Health](https://phpackages.com/badges/strongsquirrel-yii2-dotenv-app/health.svg)](https://phpackages.com/packages/strongsquirrel-yii2-dotenv-app)
```

###  Alternatives

[developeruz/yii-vue-app

Yii 2 + Vue.js Basic Project Template

1221.6k](/packages/developeruz-yii-vue-app)[yii2mod/base

Base application template for Yii2

531.3k](/packages/yii2mod-base)

PHPackages © 2026

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