pinba-bundle icon indicating copy to clipboard operation
pinba-bundle copied to clipboard

Drop twig requirement

Open trogwarz opened this issue 7 years ago • 3 comments

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"

trogwarz avatar Jan 24 '18 00:01 trogwarz

You are right. I think it is good idea to make all types of timers in bundle optional.

muxx avatar Jan 24 '18 07:01 muxx

@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?

trogwarz avatar Jan 24 '18 10:01 trogwarz

It will be great if you prepare PR! 👍

muxx avatar Jan 24 '18 13:01 muxx