new version burlang.ru
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
api/v1
assets
bootstrap
commands
components
config
controllers
environments
grid
mail/layouts
messages
migrations
models
modules/user
rbac/migrations
runtime
services
tests
views
web
widgets
.bowerrc
.gitignore
.php_cs
README.md
codeception.yml
composer.json
composer.lock
gulpfile.js
init
init.bat
package.json
yii.bat

README.md

burlang.ru

Installation

1. Install dependencies

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

composer global require "fxp/composer-asset-plugin"
composer install

2. Initialize configs

Run init in the root directory. Choose development environment.

3. Database

By this moment you should have config/param-local.php. Specify your database connection there.

3.1. Migration

php yii migrate/up --migrationPath=@vendor/dektrium/yii2-user/migrations
php yii migrate/up --migrationPath=@yii/rbac/migrations
php yii migrate/up --migrationPath=@app/rbac/migrations
php yii migrate

4. Create user

php yii user/create <email> <username> [password] [...options...]

5. Role configuration

5.1. Adds role to user

php yii roles/assign

5.2 Removes role from user

php yii roles/revoke

6. Build

Run gulp build - automatically build target CSS/JS files

7. PHP_CodeSniffer

Example: ./vendor/bin/phpcs -s --colors --extensions=php --standard=PSR2 ./folder-name

8. PHP Code fixer

For folder: ./vendor/bin/php-cs-fixer fix ./folder-name --config .php_cs

For project: ./vendor/bin/php-cs-fixer fix --config .php_cs

Composer script: composer phpcs-fixer

9. PHP Mess Detector

./vendor/bin/phpmd ./folder-name text codesize,unusedcode,naming,design,controversial,cleancode