Yii2 Practical Application Advanced Template Startup-kit ¶
This is Yii2 startup application template. It was created and developing as a fast start for building an advanced sites based on Yii2. It covers typical use cases for a new project and will help you not to waste your time doing the same work in every project
Note: The application is still under development. Use it at your own risk
Note: Some features are still under development. Please use it at your own risk
- Application Auto Installer includes:
- Application Basic Setup such as Application Name, Cache type, backend/frontend theme etc.
- Admin Account setup
- Mailer Component setup
- Auto migrate required tables required by the the application
- Based on yii2-advanced application template
- Beautiful and open source dashboard theme for backend
- Sign in, Sign up, profile(avatar, locale, personal data) etc
- OAuth authorization
- User management: CRUD
- Yii2 log web interface
- Application events component
- System information web interface
- many other features coming soon
The minimum requirement by this application template that your Web server supports PHP 5.4.0.
Install via Composer ¶
You can then install the application using the following command:
composer global require "fxp/composer-asset-plugin:1.0.0" composer create-project --prefer-dist --stability=dev abhi1693/yii2-app-advanced-startup-kit demo-app
Install from GitHub ¶
Extract the github archive file or clone this repository.
git clone https://github.com/abhi1693/yii2-app-advanced-startup-kit.git
After extraction run
php composer.phar install
GETTING STARTED ¶
After you install the application, just run
init command (without altering anything in the
and select your environment then go to
http://yourhost/your-app/ and the application will help you setup everything else.
Install additional composer packages:
php composer.phar require --dev "codeception/codeception: 1.8.*@dev" "codeception/specify: *" "codeception/verify: *"
This application boilerplate use database in testing, so you should create three databases that are used in tests:
yii2_practical_unit- database for unit tests;
yii2_practical_functional- database for functional tests;
yii2_practical_acceptance- database for acceptance tests.
To make your database up to date, you can run in needed test folder
yii migrate, for example
if you are starting from
frontend tests then you should run
yii migrate in each suite folder
it will upgrade your database to the last state according migrations.
To be able to run acceptance tests you need a running webserver. For this you can use the php builtin server and run it in the directory where your main project folder is located. For example if your application is located in
/www/practical all you need to is:
cd /www and then
php -S 127.0.0.1:8080 because the default configuration of acceptance tests expects the url of the application to be
If you already have a server configured or your application is not located in a folder called
practical, you may need to adjust the
After that is done you should be able to run your tests, for example to run
frontend tests do:
In similar way you can run tests for other application tiers -
You also can adjust you application suite configs and
_bootstrap.php settings to use other urls and files, as it is can be done in