title: beforeAction() should be compatible with yii\web\Controller::beforeAction($action)
body: <p>I am working on a project and it is working fine on live server and on my local. but when i upload it on another server it gives me error of 
  beforeAction() should be compatible with yii\web\Controller::beforeAction($action).</p>
  
  <p>I set up all the needed things on the server.</p>
  
  <p>But When i login to my project on new server it gives me blank page with no error. And when i access inner pages(pages after login) it gives me error that 
  beforeAction() should be compatible with yii\web\Controller::beforeAction($action).</p>
  
  <p>I cant understand actual problem and <strong>i go through all the related answer given by this error but i can't find the exact answer.</strong></p>
  
  <p>This is my beforeAction Function </p>
  
  <pre><code>public function beforeAction() {
  
      if (\Yii::$app-&gt;getUser()-&gt;isGuest) {
          $this-&gt;redirect(Yii::$app-&gt;urlManager-&gt;createAbsoluteUrl('auth/login'));
          return false;
      } else {
          return true;
      }
  }
  </code></pre>