pinba-bundle
pinba-bundle copied to clipboard
Drop twig requirement
Hi!
I'm using Symfony 3.x as json-api without need for twig at all.
After installing this bundle i see error Fatal error: Uncaught Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: The service "fos_rest.exception.twig_controller" has a dependency on a non-existent service "twig".
So, why? And how to disable this requirement? I don't need any rendering stuff from Pinba – only send "smart timers" to see queries, correct routes etc.
After some digging into, i just drop these lines and everything works good.
./vendor/intaro/pinba-bundle/Intaro/PinbaBundle/Resources/config/services.yml
:
services:
templating.engine.twig:
class: "%intaro_pinba.templating.engine.twig.class%"
public: false
arguments:
- "@twig"
- "@templating.name_parser"
- "@templating.locator"
- "@intaro_pinba.stopwatch"
You are right. I think it is good idea to make all types of timers in bundle optional.
@muxx, yeah, it will be good. I don't have any experience in writing bundles, but i can try to make a PR if you don't have enough time. Or just wait?
It will be great if you prepare PR! 👍