symfony/symfony — Issue #3372: [Profiler] relying on current config instead of config of displayed profile.
Author: wodor
Created: 2012-02-15 17:57:38+00:00
State: open

when you keep default value of 'logging' in swiftmailer it varies between envs

// Symfony\Bundle\SwiftmailerBundle\DependencyInjection\Configuration :
->booleanNode('logging')->defaultValue($this->debug)->end()

when you workaround issue with section (i.e by shameless return 0) and then you try to show an Profile generated in prod env on dev env it leads to following exception:

An exception has been thrown during the rendering of a template ("Collector "swiftmailer" does not exist.") in WebProfilerBundle:Profiler:toolbar.html.twig at line 34.

there is a foreach of collectors (in current env) ], and Profile#getcollector('swiftmailer') fails on unserialised object from prod because there swiftmailer colletor was'nt enabled

I think the problem is that profiler on dev relies on it's current configuration instad on content of collected data. I'd rather expect that i will be able to display Profile from any source (i.e. different server) in the profiler.