Skip to content

Commit

Permalink
Add alowed class map. (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
terabytesoftw authored Oct 30, 2023
1 parent b2c0e21 commit 90bd387
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 1 addition & 3 deletions config/modules.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

declare(strict_types=1);

use yii\debug\Module;

/**
* @var array $params
*/
Expand All @@ -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'],
],
],
Expand Down

0 comments on commit 90bd387

Please sign in to comment.