title: Yii2 class not found
body: <p>I am getting the error message "Class ... not found" even though the class exists.  The error happens in the method loginByAccessToken() in yii\web\User class.  Any ideas what may be causing this?</p>
  
  <pre><code>public function loginByAccessToken($token, $type = null)
  {
      /* @var $class IdentityInterface */
      $class = $this-&gt;identityClass;
      $identity = $class::findIdentityByAccessToken($token, $type); // &lt;-- Error occurs here.  
      if ($identity &amp;&amp; $this-&gt;login($identity)) {
          return $identity;
      } else {
          return null;
      }
  }
  </code></pre>
  
  <p>Following is the debug trace:</p>
  
  <pre><code>{
  name: "PHP Fatal Error"
  message: "Class 'common\models\User' not found"
  code: 1
  type: "yii\base\ErrorException"
  file: "C:\Bitnami\wampstack-5.5.26-0\apache2\htdocs\csplit\vendor\yiisoft\yii2\web\User.php"
  line: 266
  stack-trace: [12]
  0:  "#0 C:\Bitnami\wampstack-5.5.26-0\apache2\htdocs\csplit\vendor\yiisoft\yii2\filters\auth\AuthMethod.php(50): yii\filters\auth\HttpBasicAuth-&gt;authenticate('???', '???', '???')"
  1:  "#1 C:\Bitnami\wampstack-5.5.26-0\apache2\htdocs\csplit\vendor\yiisoft\yii2\base\ActionFilter.php(71): yii\filters\auth\AuthMethod-&gt;beforeAction('???')"
  2:  "#2 C:\Bitnami\wampstack-5.5.26-0\apache2\htdocs\csplit\vendor\yiisoft\yii2\base\Component.php(541): yii\base\ActionFilter-&gt;beforeFilter('???')"
  3:  "#3 C:\Bitnami\wampstack-5.5.26-0\apache2\htdocs\csplit\vendor\yiisoft\yii2\base\Component.php(541): ::call_user_func:{C:\Bitnami\wampstack-5.5.26-0\apache2\htdocs\csplit\vendor\yiisoft\yii2\base\Component.php:541}('???', '???')"
  4:  "#4 C:\Bitnami\wampstack-5.5.26-0\apache2\htdocs\csplit\vendor\yiisoft\yii2\base\Controller.php(263): yii\base\Component-&gt;trigger('???', '???')"
  5:  "#5 C:\Bitnami\wampstack-5.5.26-0\apache2\htdocs\csplit\vendor\yiisoft\yii2\web\Controller.php(108): yii\base\Controller-&gt;beforeAction('???')"
  6:  "#6 C:\Bitnami\wampstack-5.5.26-0\apache2\htdocs\csplit\vendor\yiisoft\yii2\base\Controller.php(149): yii\web\Controller-&gt;beforeAction('???')"
  7:  "#7 C:\Bitnami\wampstack-5.5.26-0\apache2\htdocs\csplit\vendor\yiisoft\yii2\base\Module.php(455): yii\base\Controller-&gt;runAction('???', '???')"
  8:  "#8 C:\Bitnami\wampstack-5.5.26-0\apache2\htdocs\csplit\vendor\yiisoft\yii2\web\Application.php(84): yii\base\Module-&gt;runAction('???', '???')"
  9:  "#9 C:\Bitnami\wampstack-5.5.26-0\apache2\htdocs\csplit\vendor\yiisoft\yii2\base\Application.php(375): yii\web\Application-&gt;handleRequest('???')"
  10:  "#10 C:\Bitnami\wampstack-5.5.26-0\apache2\htdocs\csplit\api\web\index.php(17): yii\base\Application-&gt;run()"
  11:  "#11 {main}"
  -
  }
  </code></pre>