Add route info to debug bar

This commit is contained in:
Pierre Rudloff 2021-02-07 12:24:16 +01:00
parent 9af922f3f1
commit 50fe879f16
3 changed files with 52 additions and 2 deletions

View file

@ -9,6 +9,7 @@ use DebugBar\DataCollector\PhpInfoCollector;
use DebugBar\DataCollector\RequestDataCollector; use DebugBar\DataCollector\RequestDataCollector;
use DebugBar\DebugBar; use DebugBar\DebugBar;
use DebugBar\DebugBarException; use DebugBar\DebugBarException;
use Kitchenu\Debugbar\DataCollector\SlimRouteCollector;
use Slim\Container; use Slim\Container;
/** /**
@ -34,7 +35,8 @@ class DebugBarFactory
->addCollector(new MessagesCollector()) ->addCollector(new MessagesCollector())
->addCollector($requestCollector) ->addCollector($requestCollector)
->addCollector(new MemoryCollector()) ->addCollector(new MemoryCollector())
->addCollector($configCollector); ->addCollector($configCollector)
->addCollector(new SlimRouteCollector($container->get('router'), $container->get('request')));
$container->get('logger')->add('debugbar', $debugBar->getCollector('messages')); $container->get('logger')->add('debugbar', $debugBar->getCollector('messages'));

View file

@ -45,6 +45,7 @@
"ergebnis/composer-normalize": "^2.6", "ergebnis/composer-normalize": "^2.6",
"insite/composer-dangling-locked-deps": "^0.2.1", "insite/composer-dangling-locked-deps": "^0.2.1",
"junker/debugbar-smarty": "dev-master", "junker/debugbar-smarty": "dev-master",
"kitchenu/slim-debugbar": "^1.1",
"maximebf/debugbar": "^1.16", "maximebf/debugbar": "^1.16",
"php-mock/php-mock-mockery": "^1.3", "php-mock/php-mock-mockery": "^1.3",
"phpro/grumphp": "^1.1", "phpro/grumphp": "^1.1",

49
composer.lock generated
View file

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"content-hash": "ce151882c06d9b14d20fee47cb22be42", "content-hash": "d67f3db130b0bdbf050c34630c130cab",
"packages": [ "packages": [
{ {
"name": "aura/session", "name": "aura/session",
@ -4104,6 +4104,53 @@
], ],
"time": "2020-05-27T16:41:55+00:00" "time": "2020-05-27T16:41:55+00:00"
}, },
{
"name": "kitchenu/slim-debugbar",
"version": "v1.1.1",
"source": {
"type": "git",
"url": "https://github.com/kitchenu/Slim-DebugBar.git",
"reference": "906dcecd1f85239ef262312c276b1e8e5663ad50"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/kitchenu/Slim-DebugBar/zipball/906dcecd1f85239ef262312c276b1e8e5663ad50",
"reference": "906dcecd1f85239ef262312c276b1e8e5663ad50",
"shasum": ""
},
"require": {
"maximebf/debugbar": "^1.12.0",
"php": ">=5.5.0",
"psr/http-message": "^1.0",
"slim/slim": "^3.0"
},
"require-dev": {
"phpunit/phpunit": "^4.0|^5.0"
},
"type": "library",
"autoload": {
"psr-4": {
"Kitchenu\\Debugbar\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Kitchenu"
}
],
"description": "PHP Debugbar integration for Slim 3",
"keywords": [
"debug",
"debugbar",
"framework",
"slim"
],
"time": "2018-07-29T16:58:54+00:00"
},
{ {
"name": "league/container", "name": "league/container",
"version": "2.4.1", "version": "2.4.1",