yii\app\controllers\SiteController 0 0 1 2
    yii\app\models\User 0 4 16 2
CA (Afferent Coupling)
Number of unique incoming dependencies from other artifacts of the same type.
CE (Efferent Coupling)
Number of unique outgoing dependencies to other artifacts of the same type.
CID (Class Interface Size)
Number of non private methods and properties of a class: CIS = public(NOM + VARS)
Measures the size of the interface from other parts of the system to a class.
Depth of Inheritance Tree
Depth of inheritance to root class
    "name": "yiisoft/yii-base-api",
    "type": "library",
    "description": "Yii Framework REST API Application Base",
    "keywords": ["yii", "framework", "application", "rest", "api"],
    "homepage": "https://github.com/yiisoft/yii-base-api",
    "license": "BSD-3-Clause",
    "support": {
        "source": "https://github.com/yiisoft/yii-base-api",
        "issues": "https://github.com/yiisoft/yii-base-api/issues",
        "forum": "http://www.yiiframework.com/forum/",
        "wiki": "http://www.yiiframework.com/wiki/",
        "irc": "irc://irc.freenode.net/yii"
    "minimum-stability": "dev",
    "prefer-stable": true,
    "require": {
        "php": ">=7.2.0",
        "yiisoft/yii-rest": "^3.0@dev",
        "yiisoft/di": "^3.0@dev",
        "yiisoft/log": "^3.0@dev",
        "yiisoft/cache": "^3.0@dev",
        "yiisoft/active-record": "^3.0@dev",
        "vlucas/phpdotenv": "^2.5",
        "hiqdev/composer-config-plugin": "^1.0@dev"
    "require-dev": {
        "phpunit/phpunit": "^7.3"
    "extra": {
        "branch-alias": {
            "dev-master": "3.0.x-dev"
        "config-plugin": {
            "params": "config/params.php",
            "common": "config/common.php",
            "web": "config/web.php"
    "autoload": {
        "psr-4": {"Yiisoft\\Yii\\Base\\Api\\": "src"}
    "autoload-dev": {
        "psr-4": {"Yiisoft\\Yii\\Base\\Api\\Tests\\": "tests"}
    "config": {
        "process-timeout": 1800
yiisoft/yii-base-api dependencies

Yii Framework

Yii Framework REST API Application

This package is Yii Framework REST API application best for rapidly creating projects.

The template includes all commonly used configurations that would allow you to focus on adding new features to your application.

Latest Stable Version Total Downloads Build Status


config/             contains application configurations
runtime/            contains files generated during runtime
  controllers/        contains Api controller classes
  models/             contains model classes
tests/              contains various tests for the basic application
vendor/             contains dependent 3rd-party packages


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


If you do not have Composer, you may install it by following the instructions at getcomposer.org.

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

composer create-project --prefer-dist --stability=dev yiisoft/app myapp
cd myapp
./vendor/bin/yii serve

Now you should be able to access the application via http://localhost:8080/.



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

return [
    '__class' => \Yiisoft\Db\Connection::class,
    'dsn' => 'mysql:host=localhost;dbname=yii2basic;charset=utf8',
    'username' => 'root',
    'password' => '1234',


  • 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.


Tests are located in tests directory.