title: Identifier "twig" is not defined - Silex Framework
body: <p>Thanks for you interest, </p>
  
  <p>I have create this APP: </p>
  
  <pre><code>// web/index.php
  require_once __DIR__.'/../vendor/autoload.php';
  
  use Silex\Application;
  use Silex\Provider\TwigServiceProvider;
  
  $app = new Application();
  $app['debug'] = true;
  
  $app-&gt;register(new TwigServiceProvider(), array(
      'twig.path' =&gt; __DIR__.'/templates',
      'twig.class_path' =&gt; __DIR__.'/../vendor/twig/twig/lib',
      'twig.options' =&gt; array('cache' =&gt; __DIR__.'/../cache'),
  ));
  
  $app-&gt;get('/', function () use ($app) {
      return $app['twig']-&gt;render('base.html.twig', array());
  });
  
  return $app;
  </code></pre>
  
  <p>But, when I load / in instance of base.html.twig be loaded, this error appear:</p>
  
  <pre><code>InvalidArgumentException: Identifier "twig" is not defined.
  in /home/victor/workspace/testProject/vendor/pimple/pimple/lib/Pimple.php line 78
  at Pimple-&gt;offsetGet('twig') in /home/victor/workspace/testProject/src/app.php line 41
  at {closure}()
  at call_user_func_array(object(Closure), array()) in /home/victor/workspace/testProject/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/HttpKernel.php line 145
  at HttpKernel-&gt;handleRaw(object(Request), '1') in /home/victor/workspace/testProject/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/HttpKernel.php line 66
  at HttpKernel-&gt;handle(object(Request), '1', true) in /home/victor/workspace/testProject/vendor/silex/silex/src/Silex/Application.php line 538
  at Application-&gt;handle(object(Request)) in /home/victor/workspace/testProject/vendor/silex/silex/src/Silex/Application.php line 515
  at Application-&gt;run() in /home/victor/workspace/testProject/web/index.php line 11
  </code></pre>
  
  <p>I have followed the official tutorial, installed it using composer and double checked all the paths...</p>