You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

56 lines
1.5 KiB

8 months ago
  1. <?php
  2. $params = require __DIR__ . '/params.php';
  3. $db = require __DIR__ . '/db.php';
  4. $config = [
  5. 'id' => 'basic-console',
  6. 'basePath' => dirname(__DIR__),
  7. 'bootstrap' => ['log'],
  8. 'controllerNamespace' => 'app\commands',
  9. 'aliases' => [
  10. '@bower' => '@vendor/bower-asset',
  11. '@npm' => '@vendor/npm-asset',
  12. '@tests' => '@app/tests',
  13. ],
  14. 'components' => [
  15. 'cache' => [
  16. 'class' => 'yii\caching\FileCache',
  17. ],
  18. 'log' => [
  19. 'targets' => [
  20. [
  21. 'class' => 'yii\log\FileTarget',
  22. 'levels' => ['error', 'warning'],
  23. ],
  24. ],
  25. ],
  26. 'db' => $db,
  27. ],
  28. 'params' => $params,
  29. /*
  30. 'controllerMap' => [
  31. 'fixture' => [ // Fixture generation command line.
  32. 'class' => 'yii\faker\FixtureController',
  33. ],
  34. ],
  35. */
  36. ];
  37. if (YII_ENV_DEV) {
  38. // configuration adjustments for 'dev' environment
  39. $config['bootstrap'][] = 'gii';
  40. $config['modules']['gii'] = [
  41. 'class' => 'yii\gii\Module',
  42. ];
  43. // configuration adjustments for 'dev' environment
  44. // requires version `2.1.21` of yii2-debug module
  45. $config['bootstrap'][] = 'debug';
  46. $config['modules']['debug'] = [
  47. 'class' => 'yii\debug\Module',
  48. // uncomment the following to add your IP if you are not connecting from localhost.
  49. //'allowedIPs' => ['127.0.0.1', '::1'],
  50. ];
  51. }
  52. return $config;