RafalFilipek/ProfilerServiceProvider — pull request #2 by peschehimself (2011-10-15 19:53:17+00:00)
Title: Fixed overloading other twig extensions

Hi

I also fixed the way you add your twig profiler extension to the application. Currently, there's no best practice yet for adding your own twig extensions (@see discussion here: https://github.com/fabpot/Silex/issues/160). I took guidance from the KnpMenu Silex extension (@see https://github.com/knplabs/KnpMenu/blob/master/src/Knp/Menu/Silex/KnpMenuServiceProvider.php) since that seems a reasonable approach.

Also, I added a check whether the Twig provider is registered. This might help with cases when it hasn't been setup yet. In that case, the profiler provider does nothing (bad).