PHPackages                             1-git/yii2-debug-api-analyser - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Debugging &amp; Profiling](/categories/debugging)
4. /
5. 1-git/yii2-debug-api-analyser

ActiveProject[Debugging &amp; Profiling](/categories/debugging)

1-git/yii2-debug-api-analyser
=============================

Extension for yii2. Return json with db request analyse from yii2 debug.

0381PHP

Since Dec 6Pushed 7y agoCompare

[ Source](https://github.com/1-git/yii2-debug-api-analyser)[ Packagist](https://packagist.org/packages/1-git/yii2-debug-api-analyser)[ RSS](/packages/1-git-yii2-debug-api-analyser/feed)WikiDiscussions master Synced 6d ago

READMEChangelogDependenciesVersions (1)Used By (0)

Yii2 debug api analyser
-----------------------

[](#yii2-debug-api-analyser)

You can analyze you queries in yii2 by using debug module. But if you have a lot of urls for testing, this library will help you to do it automatically.

For testing your pages do the next things:

1 Activate yii2 debug module [see here](https://www.yiiframework.com/extension/yiisoft/yii2-debug). To check it for working go to the next url

```
[YOUR_SITE]/debug

```

2 Add next parameters to configuration

```
'controllerMap' => [
    'apis' => 'oneGit\yii2DebugApiAnalyser\base\controllers\ApisController',
],
```

Example of backend/config/main-local.php

```
return [
    'modules' => [
        'debug' => [
            'class' => 'yii\debug\Module',
            'allowedIPs' => ['*'],
            'controllerMap' => [
                'apis' => 'oneGit\yii2DebugApiAnalyser\base\controllers\ApisController',
            ],
        ],
    ],
],
```

2 Install phpunit and create your test folder with working simple tests. If you don't have it- find in the internet

3 Add next 3 files:

3.1 Create **UrlHandler.php** with your namespace and urls in function (see **\[\[YOUR DOMAIN\]\]** bellow)

```
