Download the PHP package yarcode/yii2-app-yarcode without Composer
On this page you can find all versions of the php package yarcode/yii2-app-yarcode. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download yarcode/yii2-app-yarcode
More information about yarcode/yii2-app-yarcode
Files in yarcode/yii2-app-yarcode
Package yii2-app-yarcode
Short Description Yii 2 YarCode Project Template
License BSD-3-Clause
Homepage https://github.com/yarcode/yii2-app-yarcode
Informations about the package yii2-app-yarcode
Yii 2 YarCode Project Template
Yii 2 YarCode Project - is a skeleton Yii 2 application.
- Differences
- Requirements
- Installation
- Quality Control
- Vrutalization
- Template structure
Differences from yii2-app-advanced
In contrast to the yii2-app-advanced this template out of the box has:
- Support for .env file
- API application
- Include yii2-tools-yarcode
- Set of docker containers
- Integration with Travis CI
- Pre-installed AdminLTE theme for the backend application
Requirements
The minimum requirement by this project template that your Web server supports PHP 7+.
Installation
Install composer.
You can then install this project template using the following command:
Copy .env file
Configure .env
and apply migrations. Make sure that you are properly configured to connect to the database.
The template installation is now complete.
Quality Control
Travis CI
To automatically build and test the application in a template, use Travis CI. The configuration is located in the file .travis.yml
in the project's root directory.
In the configuration file added PHP Coding Standards Fixer.
PHP Coding Standards Fixer
This tool allows us to automatically check the project code for compliance with standards and rules.
The configuration is in the file .php_cs
in the project's root directory.
Execute the command to verify the code for compliance with the PSR-2 standard
Vrutalization
This template supports Docker technology
Base usage
Build your containers
Create volume
Init and apply migration:
Start the containers:
Now app must be working:
- frontend app: http://localhost:8001
- backend app: http://localhost:8002
- api app: http://localhost:8003
You can also start the services individually. Example, start only backend:
Test environment
Tests are in the test catalogs {application}/tests
.
They are developed with Codeception PHP Testing Framework. By default there are 2 test suites for each applications(api
, frontend
, backend
):
- unit
- functional
For more information about testing Yii2 applications, read here
To run tests in a container can be used docker-compose.test.yml
file.
Follow these three simple steps:
- Create test volume:
docker volume create --name=test_postgres_data
- Apply migration for test database:
docker-compose -f docker-compose.test.yml run --rm yii_test migrate
- Run all the tests that are in the template:
docker-compose -f docker-compose.test.yml run --rm codeception run
It is possible to run only unit or only functional tests for the application, for example
Also you can run some specific test by specifying the path to it
For debugging, it can be convenient to run tests with the flags -f
and--debug
Template structure
The root directory contains the following subdirectories and files:
All versions of yii2-app-yarcode with dependencies
yiisoft/yii2 Version ~2.0.12
yiisoft/yii2-bootstrap Version ~2.0.0
yiisoft/yii2-swiftmailer Version ~2.0.0
yarcode/yii2-tools-yarcode Version ^1
yarcode/yii2-fa Version ^1.0
kartik-v/yii2-widget-alert Version ^1.1
kartik-v/yii2-widget-growl Version ^1.1
dmstr/yii2-adminlte-asset Version 2.*
vlucas/phpdotenv Version ^2.4
friendsofphp/php-cs-fixer Version ^2.4