pomm-project / pomm-symfony-bridge

Pomm2 shared elements for profiler between Silex and Symfony.
8 stars 17 forks source link

Bridge requires Twig extension #25

Closed chanmix51 closed 6 years ago

chanmix51 commented 8 years ago

When building an API, there is no need for Twig. It may be needed in the dev environment because of the profiler but in production, even though the profiler extension is not loaded, Pomm still requires the twig service to be present & configured.

When no twig configuration is set, Symfony throws the following exception

Fatal error: Uncaught Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: 
The service "pomm.twig_extension" has a dependency on a non-existent service "twig.loader".
mvrhov commented 8 years ago

Check my PR to bundle. I've fixed this exact issue there.

sanpii commented 8 years ago

PR merged. Is it fixed?

mvrhov commented 8 years ago

@chanmix51 should know if he was using it anywhere else. I've fixed the issue in a bundle.