title: Argument 1 passed to Twig_Filter::__construct() must be an instance of string, string given
body: <p>I have a problem with TWIG. This code works at school but absolutely not with my laptop. I tried with a simple code but I have the error: </p>
  
  <blockquote>
    <p>Catchable fatal error: Argument 1 passed to Twig_Filter::__construct() must be an instance of string, string given, called in /opt/lampp/htdocs/webalizer/projetSilex/vendor/twig/twig/lib/Twig/Extension/Core.php on line 139 and defined in /opt/lampp/htdocs/webalizer/projetSilex/vendor/twig/twig/lib/Twig/Filter.php on line 35</p>
  </blockquote>
  
  <p>I use php 5.6 / SILEX 2.0 / Twig 2.0</p>
  
  <p>Thanks for your help.</p>
  
  <p>My code is very simple but doesn't work:</p>
  
  <pre><code>require_once __DIR__.'/vendor/autoload.php';
  
  $app = new Silex\Application();
  $app-&gt;register(new Silex\Provider\TwigServiceProvider(), array(
  'twig.path' =&gt; __DIR__.'/views',
    ));
  
    $app-&gt;get('/', function(){
  return "hello";
    });
  
   $app-&gt;get('/hello/{name}', function($name)use($app){
  
   return $app['twig']-&gt;render('hello.twig',
                              array("name"=&gt;$name
                                  ));
  
   });
  
   $app-&gt;run();&gt;
  </code></pre>