title: Yii2 - Getting unknown property: yii\console\Application::user
body: <p>I am trying to run a console controller from the terminal, but i am getting this errors every time</p>
  
  <pre><code>Error: Getting unknown property: yii\console\Application::user
  </code></pre>
  
  <p>here is the controller </p>
  
  <pre><code>class TestController extends \yii\console\Controller {
  
  public function actionIndex() {
      echo 'this is console action';
  } }
  </code></pre>
  
  <p>and this is the concole config </p>
  
  <pre><code>return [
  'id' =&gt; 'app-console',
  'basePath' =&gt; dirname(__DIR__),
  'bootstrap' =&gt; ['log'],
  'controllerNamespace' =&gt; 'console\controllers',
  'modules' =&gt; [],
  'components' =&gt; [
      'log' =&gt; [
          'targets' =&gt; [
              [
                  'class' =&gt; 'yii\log\FileTarget',
                  'levels' =&gt; ['error', 'warning'],
              ],
          ],
      ],
  ],
  'params' =&gt; $params];
  </code></pre>
  
  <p>I tried running it using these commands with no luck</p>
  
  <pre><code>php yii test/index
  php yii test
  php ./yii test
  </code></pre>
  
  <p>can anyone help please?</p>