title: component is not getting loaded in yii2 basic
body: <p>I am using yii2 basic template. I am trying create RBAC DB using database migration in yii2, I have created few tables successfully and while I am creating RBAC tables I have got different function as show below:</p>
  
  <pre><code>protected function getAuthManager()
  {
      $authManager = Yii::$app-&gt;getAuthManager();
      if (!$authManager instanceof DbManager) {
          throw new InvalidConfigException('You should configure "authManager" component to use database before executing this migration.');
      }
      return $authManager;
  }
  </code></pre>
  
  <p>This function is not returning authManager even though I have added this </p>
  
  <pre><code>'authManager'=&gt;[
      'class'=&gt;'yii\rbac\DbManager',
  ],`
  </code></pre>
  
  <p>in console.php</p>
  
  <p>first few lines of error is:</p>
  
  <pre><code>Exception: You should configure "authManager" component to use database before executing this migration. (C:\xampp\htdocs\PMTool\migrations\m150820_064854_rbac.php:13)
   C:\xampp\htdocs\PMTool\migrations\m150820_064854_rbac.php(20): m150820_064854_rbac-&gt;getAuthManager()
  </code></pre>
  
  <p>code of console.php</p>
  
  <pre><code>`&lt;?php
  
  Yii::setAlias('@tests', dirname(__DIR__) . '/tests');
  
  $params = require(__DIR__ . '/params.php');
  $db = require(__DIR__ . '/db.php');
  
  return [
  'id' =&gt; 'basic-console',
  'basePath' =&gt; dirname(__DIR__),
  'bootstrap' =&gt; ['log', 'gii'],
  'controllerNamespace' =&gt; 'app\commands',
  'modules' =&gt; [
      'gii' =&gt; 'yii\gii\Module',
  ],
  'components' =&gt; [
      'cache' =&gt; [
          'class' =&gt; 'yii\caching\FileCache',
      ],
      'log' =&gt; [
          'targets' =&gt; [
              [
                  'class' =&gt; 'yii\log\FileTarget',
                  'levels' =&gt; ['error', 'warning'],
              ],
          ],
      ],
      'db' =&gt; $db,
      'authManager'=&gt;[
          'class'=&gt;'yii\rbac\DbManager',
      ],
  ],
  'params' =&gt; $params,
  ];
  </code></pre>