bolt/bolt — pull request #639 by donottumbledry (2013-10-22 09:32:05+00:00)
Title: Added Twig profiling to debug bar

Twig profiler ported from https://github.com/Elao/WebProfilerExtraBundle so all credit to that author.

Slightly hackish way of getting the used templates into the profiler as there is no native way of collecting the information from Twig. The original author used Symfony which allows overwriting bundles and components in the DI container when the container is compiled. Unfortunately I cannot find a way to do this in Silex so we we (for the time being) have to go along with this route which used @bobdenotter's original implementation of regexing the Twig object to extract template names.