I set up the demo of symfony ('https://symfony.com/download'). I browse the app in my browser and I receive that error in the log:
CRITICAL - Uncaught PHP Exception Twig_Error_Runtime: "An exception has been thrown during the rendering of a template ("An exception occured in driver: could not find driver") in "blog/index.html.twig" at line 6." at /usr/local/bin/symfony-project/symfony_demo/var/cache/dev/classes.php line 7607
The line 7607 of the file:
catch (Exception $e) {
throw new Twig_Error_Runtime(sprintf('An exception has been thrown during the rendering of a template ("%s").', $e->getMessage()), -1, $template->getTemplateName(), $e);
}
I tried to install php-curl because also i cannot log in to the backend of the app(Symfony Demo - unable to sign in). It didnt fix the problem.
Maybe I should try (What happened after pushing my local repository to github?). I dont know if in my case I can clear the cache to fix it and how to do it.
Here is the index.html.twig :
{% block main %}
{% for post in posts %}
<article class="post">
<h2><a href="{{ path('blog_post', { slug: post.slug }) }}"> {{ post.title }} </a></h2>
{{ post.summary|md2html }}
</article>
{% else %}
<div class="well">{{ 'post.no_posts_found'|trans }}</div>
{% endfor %}
<div class="navigation text-center"> {{ pagerfanta(posts, 'twitter_bootstrap3_translated', { routeName: 'blog_index_paginated' }) }} </div>
{% endblock %}
{{ post.title }}
{{ post.summary|md2html }}