Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop twig requirement #9

Open
trogwarz opened this issue Jan 24, 2018 · 3 comments
Open

Drop twig requirement #9

trogwarz opened this issue Jan 24, 2018 · 3 comments

Comments

@trogwarz
Copy link

trogwarz commented Jan 24, 2018

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 trogwarz changed the title Why Twig is required? Drop twig requirement Jan 24, 2018
@muxx
Copy link
Member

muxx commented Jan 24, 2018

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

@trogwarz
Copy link
Author

trogwarz commented Jan 24, 2018

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

@muxx
Copy link
Member

muxx commented Jan 24, 2018

It will be great if you prepare PR! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants