I am using symfony2 and its debug toolbar is great.
However, I\'ve come to install som extra bundles which add some elements and it is now displayed on two levels.>
I had issue with php-cache. It had CacheDataCollector which could crash symfony2 in some cases - https://github.com/php-cache/issues/issues/112 I tried solution above (with priority 0) - and it doesnt worked, data-collector still crashed symfony2
I dont have any ideas why priority = 0 should disable anything. You could check symfony2 ProfilerPass yourself, which process tag data_collector in https://github.com/avorobiev/symfony2/blob/master/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/ProfilerPass.php
So, I have used pretty dirty patch intead - in application config I add service with the same name, but without tag data_collector. Like
services:
cache.data_collector:
class: Cache\CacheBundle\DataCollector\CacheDataCollector
More clean and more stable way would be adding CompilerPass, which will remove tag - https://blog.liplex.de/disable-elements-in-the-symfony-developer-toolbar-with-compilerpass/