Skip to content

cleverad/yii2-demo-aggregates

 
 

Repository files navigation

Yii 2 DDD Aggregates Demo

Demonstration of domain entities and repositories.

INSTALLATION

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

git clone [email protected]:ElisDN/yii2-demo-aggregates project
cd project
composer global require "fxp/composer-asset-plugin:^1.2.0"
composer install

CONFIGURATION

Add the file config/db.php with real data, for example:

<?php
return [
    'class' => 'yii\db\Connection',
    'dsn' => 'mysql:host=localhost;dbname=aggregates',
    'username' => 'root',
    'password' => '1234',
    'charset' => 'utf8',
];

Add the file config/test_db.php for test data, for example:

<?php
$db = require(__DIR__ . '/db.php');
$db['dsn'] = 'mysql:host=localhost;dbname=aggregates_test';
return $db;

Apply migrations:

php yii migrate
php tests/bin/yii migrate

TESTING

Tests can be executed by running:

vendor/bin/codecept run unit entities
vendor/bin/codecept run unit repositories

About

Demo example for article series

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 96.3%
  • CSS 2.4%
  • Batchfile 1.3%