title: Declaration of UsersController::beforeFilter() should be compatible with AppController::beforeFilter(Cake\Event\Event $event)
body: <p>I am not experienced with cakephp ver3.1.3</p>
  
  <p>I followed the instructions to implement login authentication function;
  <a href="http://book.cakephp.org/3.0/en/tutorials-and-examples/blog-auth-example/auth.html" rel="noreferrer">http://book.cakephp.org/3.0/en/tutorials-and-examples/blog-auth-example/auth.html</a></p>
  
  <p>I managed to successfully cake bake my cakephp v3.1.3 app.</p>
  
  <p>I have a problem with UsersController.php</p>
  
  <p>I have the following code copied and pasted from <a href="http://book.cakephp.org/3.0/en/tutorials-and-examples/blog-auth-example/auth.html" rel="noreferrer">http://book.cakephp.org/3.0/en/tutorials-and-examples/blog-auth-example/auth.html</a>;</p>
  
  <pre><code>public function beforeFilter(Event $event)
  {
      parent::beforeFilter($event);
      // Allow users to register and logout.
      // You should not add the "login" action to allow list. Doing so would
      // cause problems with normal functioning of AuthComponent.
      $this-&gt;Auth-&gt;allow(['add', 'logout']);
  } //public function beforeFilter(Event $event)
  </code></pre>
  
  <p>The presence of this code created the error below;</p>
  
  <blockquote>
    <p>Strict (2048): Declaration of
    App\Controller\UsersController::beforeFilter() should be compatible
    with App\Controller\AppController::beforeFilter(Cake\Event\Event
    $event) [APP/Controller\UsersController.php, line 12] Code Context
    include - APP/Controller\UsersController.php, line 12
    Composer\Autoload\includeFile - ROOT\vendor\composer\ClassLoader.php,
    line 412 Composer\Autoload\ClassLoader::loadClass() -
    ROOT\vendor\composer\ClassLoader.php, line 301 spl_autoload_call -
    [internal], line ?? class_exists - [internal], line ??
    Cake\Core\App::_classExistsInBase() - CORE\src\Core\App.php, line 89
    Cake\Core\App::className() - CORE\src\Core\App.php, line 66
    Cake\Routing\Filter\ControllerFactoryFilter::_getController() -
    CORE\src\Routing\Filter\ControllerFactoryFilter.php, line 81
    Cake\Routing\Filter\ControllerFactoryFilter::beforeDispatch() -
    CORE\src\Routing\Filter\ControllerFactoryFilter.php, line 49
    Cake\Routing\DispatcherFilter::handle() -
    CORE\src\Routing\DispatcherFilter.php, line 145
    Cake\Event\EventManager::_callListener() -
    CORE\src\Event\EventManager.php, line 389
    Cake\Event\EventManager::dispatch() - CORE\src\Event\EventManager.php,
    line 355 Cake\Routing\Dispatcher::dispatchEvent() -
    CORE\src\Event\EventDispatcherTrait.php, line 78
    Cake\Routing\Dispatcher::dispatch() - CORE\src\Routing\Dispatcher.php,
    line 62 [main] - ROOT\webroot\index.php, line 37</p>
  </blockquote>
  
  <p>If I remove the offending code segment, the error disappears. What is wrong with the code segment? </p>