diff --git a/api/aop/AspectKernel.php b/api/aop/AspectKernel.php new file mode 100644 index 0000000..c003331 --- /dev/null +++ b/api/aop/AspectKernel.php @@ -0,0 +1,13 @@ +init([ + 'debug' => YII_DEBUG, + 'appDir' => __DIR__ . '/../../', + 'cacheDir' => __DIR__ . '/../runtime/aspect', + 'excludePaths' => [ + __DIR__ . '/../runtime/aspect', + __DIR__ . '/../../vendor', + ], +]); + require __DIR__ . '/../../vendor/yiisoft/yii2/Yii.php'; +spl_autoload_unregister(['Yii', 'autoload']); require __DIR__ . '/../../common/config/bootstrap.php'; require __DIR__ . '/../config/bootstrap.php'; -$config = \common\config\ConfigLoader::load('api'); +$config = ConfigLoader::load('api'); -$application = new yii\web\Application($config); +$application = new Application($config); $application->run(); diff --git a/composer.json b/composer.json index fb033f1..975a12c 100644 --- a/composer.json +++ b/composer.json @@ -23,7 +23,9 @@ "spomky-labs/otphp": "^9.0.2", "bacon/bacon-qr-code": "^1.0", "paragonie/constant_time_encoding": "^2.0", - "webmozart/assert": "^1.2.0" + "webmozart/assert": "^1.2.0", + "goaop/framework": "~2.1.2", + "domnikl/statsd": "^2.6" }, "require-dev": { "yiisoft/yii2-debug": "*", @@ -51,6 +53,11 @@ } ], "autoload": { + "psr-4": { + "api\\": "api", + "common\\": "common", + "console\\": "console" + }, "files": [ "common/consts.php" ]