php-debugbar
php-debugbar copied to clipboard
twig collector errors
When i use the twig collection code example in the repo i get javascript errors in my console
Uncaught TypeError: Cannot read property 'ajax' of null
at itemRenderer (widget.js:22)
at child.<anonymous> (widgets.js:155)
at child.set (debugbar.js:155)
at child.<anonymous> (widget.js:63)
at child.set (debugbar.js:155)
at child.<anonymous> (debugbar.js:287)
at child.set (debugbar.js:155)
at Array.<anonymous> (debugbar.js:978)
at Function.each (jquery.min.js:2)
at child.dataChangeHandler (debugbar.js:972)
Here is my code
$profile = new \Twig\Profiler\Profile();
$container[ViewManager::class]->getEnvironment()->addExtension(new \DebugBar\Bridge\Twig\TimeableTwigExtensionProfiler($profile));
$container[DebugManager::class]->getBar()->addCollector(new \DebugBar\Bridge\TwigProfileCollector($profile));
when i add the time collector to the TimeableTwigExtensionProfiler
i get an Failed stopping measure 'home.twig' because it hasn't been started
error.
I hope someone can help
Fixed on https://github.com/maximebf/php-debugbar/pull/377