yii2-usuario icon indicating copy to clipboard operation
yii2-usuario copied to clipboard

Yii2 debugger error on inherited Usuario Controller

Open dbd5 opened this issue 4 years ago • 1 comments

What steps will reproduce the problem?

  1. setup a custom controller as documented in overiding-controllers.md
  2. Add the custom controller to the modules' controller map in main.config
  3. Use the beforeAction function in the custom controller to switch layouts

What is the expected result?

layout switching works as expected, the module works ok

What do you get instead?

Attempts to open the Yii debugger shows an error; Argument 2 passed to Da\User\Controller\RecoveryController::__construct() must be an instance of Da\User\Module, instance of yii\web\Application given

This is similar to #64 so my complaint here is simply that the debugger throws this new error. It seems that Yii debugger code instantiates the custom class by passing yii\web\Application as module instead of the Usuario module.

What can I do to resolve this?

dbd5 avatar Feb 14 '21 11:02 dbd5

An additional information; This debugger error is seen only in the Router TAB of the debugger

dbd5 avatar Feb 14 '21 11:02 dbd5