diff --git a/README.md b/README.md index 91256c4..131b109 100644 --- a/README.md +++ b/README.md @@ -149,6 +149,19 @@ return [ ]; ``` +> For class map module, add in your config/params.php file in your application. + +```php +use App\YourClass; + +return [ + 'yii2.debug.classMap' => [ + 'class' => YourClass::class, + ], +]; +``` + + ## Testing [Check the documentation testing](/docs/testing.md) to learn about testing. diff --git a/config/modules.php b/config/modules.php index ebd6de2..c77fd6e 100644 --- a/config/modules.php +++ b/config/modules.php @@ -2,8 +2,6 @@ declare(strict_types=1); -use yii\debug\Module; - /** * @var array $params */ @@ -14,7 +12,7 @@ // configuration adjustments for 'dev' environment 'modules' => [ 'debug' => [ - 'class' => Module::class, + 'class' => $params['yii2.debug.classMap'] ?? \yii\debug\Module::class, 'allowedIPs' => $params['yii2.debug.allowedIPs'] ?? ['127.0.0.1', '::1'], ], ],